Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi, I’m also getting a similar error – I’m using version 1.0.16 of the plugin – my error is AMOUNT_MISMATCH.

    As you will see, my line items add up to 218.99, but the total amount charged is 219.00.

    I have “Round tax at subtotal level, instead of rounding per line” setting in WooCommerce enabled – I think that may be part of the issue, however I would like to use the PayPal plugin with this setting on.

    Would you be able to have a look at this please?

    Many thanks

    2022-12-14T18:00:56+00:00 ERROR API error: Array
    (
        [url] => https://api-m.paypal.com/v2/checkout/orders/[redacted]
        [method] => PATCH
        [request] => Array
    (
        [0] => Array
            (
                [op] => replace
                [path] => /purchase_units/@reference_id=='default'
                [value] => Array
                    (
                        [amount] => Array
                            (
                                [value] => 219.00
                                [currency_code] => GBP
                                [breakdown] => Array
                                    (
                                        [item_total] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 209.60
                                            )
                                        [shipping] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 9.52
                                            )
                                        [tax_total] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 10.43
                                            )
                                        [discount] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 10.56
                                            )
                                        [handling] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 0.00
                                            )
                                    )
                            )
                        [invoice_id] => [redacted]
                        [custom_id] => [redacted]
                        [items] => Array
                            (
                                [0] => Array
                                    (
                                        [name] => [redacted]
                                        [quantity] => 20
                                        [unit_amount] => Array
                                            (
                                                [currency_code] => GBP
                                                [value] => 10.48
                                            )
                                    )
                            )
                        [description] => [redacted]
                        [shipping] => [redacted]
                        [reference_id] => default
                    )
            )
    )
    
        [error] => Array
            (
                [name] => UNPROCESSABLE_ENTITY
                [details] => Array
                    (
                        [0] => Array
                            (
                                [field] => /purchase_units/@reference_id=='default'/amount/value
                                [value] => 219.00
                                [issue] => AMOUNT_MISMATCH
                                [description] => Should equal item_total + tax_total + shipping + handling + insurance - shipping_discount - discount.
                            )
                    )
                [message] => The requested action could not be performed, semantically incorrect, or failed business validation.
                [debug_id] => 1eed400835ac8
                [links] => Array
                    (
                        [0] => Array
                            (
                                [href] => https://developer.paypal.com/docs/api/orders/v2/#error-AMOUNT_MISMATCH
                                [rel] => information_link
                                [method] => GET
                            )
                    )
            )
    )
    • This reply was modified 2 years, 3 months ago by trogdoor9432. Reason: Messed up code quote tags, sorry!
Viewing 1 replies (of 1 total)