You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases when a coupon is being used, the customer get error, TAX_TOTAL_MISMATCH.
POST https://api.paypal.com/v2/checkout/orders
Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"USD","value":"80.16","breakdown":{"item_total":{"currency_code":"USD","value":"95.00"},"shipping":{"currency_code":"USD","value":"0.00"},"tax_total":{"currency_code":"USD","value":"6.54"},"discount":{"currency_code":"USD","value":"21.38"}}},"description":"","items":[{"name":"prod2","unit_amount":{"currency_code":"USD","value":"95.00"},"quantity":1,"description":"","sku":"","category":"PHYSICAL_GOODS","tax":{"currency_code":"USD","value":"6.53"}}],"payee":{"merchant_id":"9LJB9AXR9TPMU"},"shipping":{"name":{"full_name":"John Doe"},"address":{"country_code":"US","address_line_1":"1 Main St","address_line_2":"1","admin_area_1":"MN","admin_area_2":"ny","postal_code":"99501"}}}],"application_context":{"user_action":"CONTINUE","shipping_preference":"GET_FROM_FILE","landing_page":"LOGIN","locale":"en-US","brand_name":"\"WooCommerce PayPal Payments\"","return_url":"http:\/\/wc-pp.myhost\/?wc-ajax=ppc-return-url","cancel_url":"http:\/\/wc-pp.myhost\/checkout\/"},"payer":{"name":{"given_name":"John","surname":"Doe"},"email_address":"[email protected]","address":{"country_code":"US","address_line_1":"1 Main St","address_line_2":"1","admin_area_1":"MN","admin_area_2":"ny","postal_code":"99501"},"phone":{"phone_type":"HOME","phone_number":{"national_number":"4088381528"}}},"payment_method":{"payee_preferred":"UNRESTRICTED","payer_selected":"PAYPAL"}}
Response Debug ID: e999372fa047d
Response: Array
(
[code] => 422
[message] => Unprocessable Entity
)
Response Body: {"name":"UNPROCESSABLE_ENTITY","details":[{"field":"/purchase_units/@reference_id=='default'/amount/breakdown/tax_total/value","value":"6.54","issue":"TAX_TOTAL_MISMATCH","description":"Should equal sum of (tax * quantity) across all items for a given purchase_unit"}],"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"e999372fa047d","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-TAX_TOTAL_MISMATCH","rel":"information_link","method":"GET"}]}
Steps to reproduce
It seems like it is reproduced only in some environments.
I reproduced it in the docker env with WC 5.8, PHP 7.1.
Add a product with price $95, add tax 6.8750%, and $20 coupon.
Go to checkout, enter the coupon, pay, and this error will appear:
The text was updated successfully, but these errors were encountered:
The fix (#373) is tested and merged into trunk so it will be included in the next release (1.6.3), in the meantime I´m attaching the plugin package from trunk in case you want to use it: woocommerce-paypal-payments.zip
In some cases when a coupon is being used, the customer get error, TAX_TOTAL_MISMATCH.
Steps to reproduce
It seems like it is reproduced only in some environments.
I reproduced it in the docker env with WC 5.8, PHP 7.1.
Add a product with price $95, add tax 6.8750%, and $20 coupon.
Go to checkout, enter the coupon, pay, and this error will appear:
The text was updated successfully, but these errors were encountered: