Japanese Yen and Paypal - JPY error 10401
Hi,
In setting up Zen-cart to be able to handle payment from Japanese yen, which is a good option right now because the USD is so weak, I came up with an error.
I have not dug into this so deep yet, but Yen is being handled wrong.
For example, lets say that 1USD = 100 yen. This would be a perfect world, and everything would work right.
Yen does not use decimals, never, only in rates can you use a decimal for yen, and then it is taken to the nearest 1 yen. 1yen is not expressed as .01, it is 1. It never goes below 1. This is the problem
So now lets say the rate is 1usd = 85.4094093 yen Now we are going to have problems paying with paypal if you don't have Yen as your default currency. The reason being, yen is going to be passed to paypal like this: 2399.94 yen, Paypal sees this, and goes...wait, yen can't be .94 send error 10401.
Dr. Byte if you have a code update you would like to do, please advise or I will come up with one soon as I have a client waiting for this.
Regards,
Shaun
Re: Japanese Yen and Paypal - JPY error 10401
What do you have for number of decimal places set for yen in your currency settings?
Re: Japanese Yen and Paypal - JPY error 10401
Hi DrByte,
It is set to 0.
Re: Japanese Yen and Paypal - JPY error 10401
Which PayPal module(s) are you seeing this with?
Can you provide me with the PayPal_CURL_xxxxxxxx.log log files from some failing EC transactions?
ie: http://www.zen-cart.com/forum/showthread.php?t=61199
And also some details of the prices/totals in the cart for those same transactions ... and your JPY vs Default currency exchange rate at the time.
Re: Japanese Yen and Paypal - JPY error 10401
Hi,
PayPal Website Payments Pro and PayPal Express Checkout.
For the Default currency I have USD, Japanese yen I have set to this.
Title: Japanese Yen
Code: JPY
Symbol Left: ¥
Symbol Right: null
Decimal Point: null
Thousands Point: ,
Decimal Places: 0
Value: 91.00000000
If the value has anything set to say, 91.2000000, then its going to error.
I will pm you the log location.
Regards,
Shaun
Re: Japanese Yen and Paypal - JPY error 10401
Quote:
Originally Posted by
CrystalKoi
Decimal Places: 0
Value: 91.00000000
If the value has anything set to say, 91.2000000, then its going to error.
So ... is that the key?
Re: Japanese Yen and Paypal - JPY error 10401
Well, yes and no. I mean if people want to run a cron to keep their rates up to date, then it is going to error until they go in and fix it.
You see what I mean? The rate for Japanese yen for the order total needs to me above .00 , if that makes sense.
You still need that log?
Re: Japanese Yen and Paypal - JPY error 10401
I think I see what you mean.
More specifically, my question is: If one uses whole numbers (no decimals) for the JPY exchange rate, does that solve ALL these problems?
(Yes, I know the currency updater tool might change that, but that's a separate matter. If the decimals are removed again, is all okay again?)
Re: Japanese Yen and Paypal - JPY error 10401
Yes I believe so. Let me put it through some more tests and make sure. I will post back.
Re: Japanese Yen and Paypal - JPY error 10401
Actually no, sorry, I should have played with my numbers first. If we set the dollar and the yen to a one to one ratio. 1$ = 100 yen, then this will work no problem.
But if I set the yen to a rate of $1 = 92 yen, and my product is $23.47, when converted to yen it will become 2,159.24 yen. Now here you can see that the .24 is going to make the error. What I would like to see is that the rate is rounded up or down, say if it is .49999 it will be rounded down and .500 and up will be rounded up to the nearest whole number.