the tax value is not rounded to 2 places, so sending the customer to paypal for payment fails.

Solution was proposed by cybermalandro - June 29, 2006 - 10:13, I didn't see a patch in the pipeline, so I'm submitting this one.

CommentFileSizeAuthor
#1 paypal_fix_tax.patch_0.txt506 byteshavoc
paypal_fix_tax.patch.txt506 byteshavoc

Comments

havoc’s picture

StatusFileSize
new506 bytes

changed line number to match current module

neclimdul’s picture

Looks reasonable but I'd like to take a closer look.

havoc’s picture

nochange in current CVS

trantt’s picture

Title: Paypal module sends incorrectly formatted tax -- breaks Paypal » two decimal places

Since taxable decimal amount can't be greater than two decimals, I made the following changes instead:

function tax_checkoutapi:

...
...

if ($total_tax <> 0) {
$total_tax = round($total_tax, 2);
}

the above line of code was added after the foreach ($rules as $rule) { loop and before if ($total_tax) {

havoc’s picture

Has this been addressed in subsequent bug fixes?

sime’s picture

I believe I saw gordon patch these but I can't be certain, please check the CVS commits to be sure: http://drupal.org/project/cvs/5841

havoc’s picture

Gordon fixed it here: http://drupal.org/cvs?commit=46913

This issue can be closed! (Woohoo!)

neclimdul’s picture

Status: Needs review » Fixed

Forward ported to HEAD. Looks fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)