Solved Payment provider returning Error: Invalid cost amount

This topic has been solved
T

tjoneslow

Guest
We've set up PayPal to accept payments for forum upgrades according to the documentation. But one user attempt to upgrade continues to post an error log with the error message: Error: Invalid cost amount

I did a search for similar errors and found this as a fixed bug against 2.0.5;

xenforo.com

Fixed - PayPal payment provider returning "Invalid cost amount" when it shouldn't.

I've been receiving the "Invalid cost amount" error message for some select payment receipts with a taxation rate set. I modified the relevant line of PayPal.php to read $state->logMessage = 'Invalid cost amount: ' . (round(floatval($state->costAmount), 2) - round(floatval($state->taxAmount)...
xenforo.com
xenforo.com

array(42) { ["mc_gross"] => string(5) "57.10" ["protection_eligibility"] =>...

Read more

Continue reading...