motion2082 Posted November 22, 2018 Share Posted November 22, 2018 Have an error in my PayPal module on ourPrestashop site. It says [30-Oct-2018 10:37:19 Australia/Sydney] PHP Notice: A non well formed numeric value encountered in /home/public_html/modules/npaypalpro/ajax.php on line 214 Line 214 is $amountCheck += number_format($item['quantity'] * $item['price'], 2); Any ideas what might be the cause? PHP7.1 on the server PayPal said I quickly checked the transaction logs and found that there is mismatch in total amount and item amount. For one of the order, total amount is AUD 2337.30 but the sum of item details are AUD 2339.30 Item Details : Hikvision 6 MB - 180.90 x 7(quantity) = 1266.30 AUD Hikvisiion 4 channel - 535.50 x 2(quantity) = 1071.00 AUD Shipping – 0 Voucher Taxes – 2.00 AUD – Which is not added in the total amount. Could you please ask the web developer to check how Voucher taxes are getting added or to see why this is not passing in the API call? Full function function totalAmountCheck($amount, $items) { $amountCheck = $diff = 0; foreach ($items as $item) $amountCheck += number_format($item['quantity'] * $item['price'], 2); if ($amountCheck != $amount) $diff = number_format($amountCheck - $amount, 2); return $diff; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now