Posted by mediamash on March 17, 2010 at 3:58pm
Jump to:
| Project: | iDEAL Pro | Ubercart Payment |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | keesje |
| Status: | closed (fixed) |
Issue Summary
i'm getting a strange error in D6. Everything worked just fine in D5, but now i'm getting the error 'Value contains non-permitted character' by Ideal.
Could it be that Drupal passes a wrong format to Ideal?
Comments
#1
this error is already described at http://drupal.org/node/709438 and is critical imho.
could someone work out a patch to get this module back up and running in drupal 6?
#2
it seems the error can be limited to the use of taxes ... any help appreciated!
#3
<amount>19094.05</amount>should be altered into<amount>19094,05</amount>, how can i make this work?error is=
Parameter '19094,05' is not a natural(or '-')#4
Is it possible that taxes generate order amounts with more than 2 decimal places? iDEAL demands order amounts in Euro cents without decimal places (not allowing tenths or hundredths of cents). This is why the amount is multiplied with 100 before sending it down to the iDEAL gateway.
What about a simple round() after multiplying? Does this introduce differences in the order amounts stored and payed? Couldn't be more than 0.01 euro per order though.
#5
HI kees..
I changed a line in the module:
317:
to:
$amount = round($arg1->order_total * 100); //amount *100
i dont know if its risky but it seems to work in the first test.
#6
#4: that is exactly what happens, bad design from the Ubercart side IMO (one should NEVER do floating point calculation on prices).
#5: should be fine. Ubercart uses number_format with 2 decimals, which is essentially the same as round(x*100)/100. I use this method in my own implementation as well.
#7
Please try new release. Be aware of broken translations due to typo fixes.
Reopen issue or make new if you encounter problems.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.