-
- 25 Posts
Hi!
I'm using the snippet mhPayPal and if hit the «pay» button with a price of CHF 6.80, I receive the following error:
Sorry, something went wrong patching you through with PayPal! Timestamp: 2017-06-26T17:43:09Z Error code: 10401
If I use CHF 7.00 as amount, it works. I think it's a problem with floats...
Can anybode help me to find out why this error is shown?
A further question:
I'd like to set a text, which is only shown in the email (Downloadlink of the paid article).
I could use "description" for that, but with the source code the user is able to get this download link without finishing the payment process.
Is it possible, to set another variable, only within the email template?
Thank you very much!
-
- 24,544 Posts
You might get an answer here:
https://github.com/Mark-H/mhPayPal/issues if Mark Hamstra doesn't see this post (or you could PM him here with a link to this post).
PayPal is notoriously strict about that sort of thing and 10401 is the paypal error about incorrect totals, so it's definitely possible it's related to floats.
It could also be related to one of the other amount properties (amountTax, amountFees, amountHandling) as I don't immediately see anything that's totalling those together. Are you specifying any of those on the snippet?
-
- 24,544 Posts
You might try this:
If it's used in a math expression and not converted to 0 first, it could cause an error depending on the computer language used to process the payment.
It's a long shot, but it can't hurt.
-
- 24,544 Posts
Can you try it with a comma instead of a dot?
&amount=`6,80`
-
- 25 Posts
If I specify the price with comma, I get this error:
The amount specified is not a valid numeric value.
If I specify a different currency (e.g. EUR or USD), this error is shown:
Sorry, something went wrong patching you through with PayPal! Timestamp: 2017-07-11T06:43:36Z Error code: 10401
Maybe I really have to make the price an even number (but how shall I explain that to my customer...)
:(