• Resolved ehrhardtda

    (@ehrhardtda)


    Hi,

    I want to switch from the previous Plugin “PayPal Plus for WooCommerce” to the new “WooCommerce PayPal Payments” Plugin.

    I’ve setup the plugin in my staging environment with a PayPal Sandbox Account.

    When I have a product in cart, depending on the quantity, there seems to be incorrect rounding, so that for some quantities the Checkout process is successful and for other quantities the checkout throws an error.

    It’s just a single product with a price of 1,99€ including taxes. No extra fees are applied by a variation or bulk discount or whatever.

    F.e. at a quantity of 9, it fails.

    Here is the log message:

    2022-07-14T09:21:24+00:00 DEBUG POST https://api.sandbox.paypal.com/v2/checkout/orders
    Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"EUR","value":"21.56","breakdown":{"item_total":{"currency_code":"EUR","value":"15.05"},"shipping":{"currency_code":"EUR","value":"3.07"},"tax_total":{"currency_code":"EUR","value":"3.44"}}},"description":"","items":[{"name":"Verkleberakel mit Filzkante","unit_amount":{"currency_code":"EUR","value":"1.67"},"quantity":9,"description":"Unser Verkleberakel mit Filzkante, ist das ideale Werkzeug, um Folien einfach und ohne Kratzer zu verkleben.\r\n\r\nDurch den flexi","sku":"SP-ZH-00002","category":"PHYSICAL_GOODS"}],"payee":{"merchant_id":"RVGS7CS2756VN"},"shipping":{"name":{"full_name":"David Ehrhardt"},"address":{"country_code":"DE","address_line_1":"Alexisweg 2","admin_area_2":"Arnstadt","postal_code":"99310"}}}],"application_context":{"user_action":"CONTINUE","shipping_preference":"GET_FROM_FILE","landing_page":"LOGIN","locale":"de-DE","brand_name":"Stickerplot","return_url":"https:\/\/stickerplot.local\/?wc-ajax=ppc-return-url&elementor_page_id=94","cancel_url":"https:\/\/stickerplot.local\/kasse\/"},"payer":{"name":{"given_name":"David","surname":"Ehrhardt"},"email_address":"[email protected]","address":{"country_code":"DE","address_line_1":"Alexisweg 2","admin_area_1":"DE-TH","admin_area_2":"Arnstadt","postal_code":"99310"}},"payment_method":{"payee_preferred":"UNRESTRICTED","payer_selected":"PAYPAL"}}
    Response Debug ID: 7789fe138eac1
    Response: Array
    (
        [code] => 422
        [message] => Unprocessable Entity
    )
    
    Response Body: {"name":"UNPROCESSABLE_ENTITY","details":[{"field":"/purchase_units/@reference_id=='default'/amount/breakdown/item_total/value","value":"15.05","issue":"ITEM_TOTAL_MISMATCH","description":"Should equal sum of (unit_amount * 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":"7789fe138eac1","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-ITEM_TOTAL_MISMATCH","rel":"information_link","method":"GET"}]}
    
    2022-07-14T09:21:24+00:00 WARNING Failed to create order. PayPal API response: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-ITEM_TOTAL_MISMATCH
    2022-07-14T09:21:24+00:00 ERROR Order creation failed: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-ITEM_TOTAL_MISMATCH
    2022-07-14T09:25:13+00:00 DEBUG GET https://api.sandbox.paypal.com/v1/notifications/webhooks
    Response Debug ID: 605d7cbb4f5ee
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    2022-07-14T09:25:15+00:00 DEBUG GET https://api.sandbox.paypal.com/v1/notifications/webhooks
    Response Debug ID: 852bbb3cafe08
    Response: Array
    (
        [code] => 200
        [message] => OK
    )

    I would really appreciate some help.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @ehrhardtda

    thank you for reaching out to us, we are here to help.

    We are aware of this issue and have already a fix in place for our next release. You can resolve this issue by reverting back to version 1.8.1 or try our beta release for our next release. You can get the packages for this version via the links.

    Please let me know if you still require additional support.

    Kind regards,
    Joost

    Thread Starter ehrhardtda

    (@ehrhardtda)

    Hi Joost,

    thanks for your reply. I’ll give it a try with your next release then.

    Regards

    David

    Plugin Support Syde Joost

    (@joostvandevijver)

    you’re welcome! Please open a new thread if this issue is not resolved with the next release, version 1.9.1 (which we expect to become available this or next week).

    I will mark this thread as resolved.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello Fabian,

    I just wanted to let you know that this issue (ITEM_TOTAL_MISMATCH) has been resolved with our 1.9.1 release this week. Please make sure you update the plugin to this version and verify that you are not encountering this issue anymore. If you do encounter new instances of this problem when using the latest version, please open a new thread.

    Kind regards,
    Joost

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘UNPROCESSABLE_ENTITY / ITEM_TOTAL_MISMATCH’ is closed to new replies.