WPPizza – A Restaurant Plugin for WordPress › Support › General Support › How to suppress the “amounts do not match” error?
- AuthorPosts
- 23 June, 2021 at 3:35 pm #56604
My website is using some custom calculations which require me to modify the amount using SESSION and javascript but the problem is that when the payment is completed on Paypal and the customer is redirected to the order page, they are seeing this error “amounts do not match”.
Is there a way to bypass/suppress this error message?
Thanks
23 June, 2021 at 5:01 pm #56605Sorry, but the amounts of what is going to be charged and what has been paid must match exactly. There is no provision for making this optional.
23 June, 2021 at 5:42 pm #56606PS: if you tell me for what purpose the amount needs to be modified I *might* be able to suggest something (but it entirely depends on what you are trying to do)
24 June, 2021 at 4:40 pm #56615Actually, I am using Ajax to get shipping price according to ZIP Codes and when that happens the price is added to the total but it is not the price that goes to Paypal. The shipping price is left out for some reason. So, I added the shipping price extra and then I am using javascript to reduce the total on the frontend. Now correct amount goes to paypal but on the website the actual amount is higher because it was changed using Javascript. If you have an idea to improve the above approach, please let me know.
If not, could you please let me know how to suppress the error message.
Either solution should work fine, according to me.Thanks
25 June, 2021 at 12:17 pm #56629delivery charges are filterable like so (as a basic example)
add_filter('wppizza_fltr_delivery_charges','my_delivery_charges', 10, 3 ); function my_delivery_charges($deliveryCharges, $session_items, $filter_param){ $deliveryCharges = 20;//set delivery charges to 20 return $deliveryCharges; }
28 June, 2021 at 4:32 pm #56666Hi Olly,
I am already using the filter to add the price that I get via AJAX. The filter works well on the site and shows the correct total on the order page but when the customer goes to PayPal the shipping amount is not added to the Total.
Do you know why it is happening?
Thanks
29 June, 2021 at 11:06 am #56668>Do you know why it is happening?
No, as it works just fine here and without seeing what you’ve done, i cannot comment any more really29 June, 2021 at 4:47 pm #56687This reply has been marked as private.29 June, 2021 at 7:33 pm #56689This reply has been marked as private. - AuthorPosts
- The topic ‘How to suppress the “amounts do not match” error?’ is closed to new replies.