• Resolved chchch

    (@goch)


    Hi,

    Im using storefront theme, and only have 2 plugins activated (wc and paypal payments).

    I activated and connected it. Im in sandbox mode. When I do a payment, it always stays stucked to ‘on hold‘, and i have those warnings:

    2024-12-17T08:01:29+00:00 Warning [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ORDER_ALREADY_COMPLETED CONTEXT: {"args":{"method":"PATCH","headers":{"Authorization":"Bearer A21AAJcN2oWh0XPKtUczXswnGXOD66SYdljEP7HxjZ_aw8UsfnY71OIEfPoLtDWuOw-z4V22F4QK3hbCOm80TwubFc4rmz7yA","Content-Type":"application/json","Prefer":"return=representation"},"body":"[{"op":"replace","path":"\/purchase_units\/@reference_id=='default'","value":{"reference_id":"default","amount":{"currency_code":"EUR","value":"49.00","breakdown":{"item_total":{"currency_code":"EUR","value":"40.83"},"shipping":{"currency_code":"EUR","value":"0.00"},"tax_total":{"currency_code":"EUR","value":"8.17"}}},"description":"","items":[{"name":"productName","unit_amount":{"currency_code":"EUR","value":"40.83"},"quantity":1,"description":"[av_submenu which_menu='' menu='78' position='left' color='header_color' mobile='disabled' av_uid='av-1yy6ajo' custom_class='pd","sku":"","category":"DIGITAL_GOODS","url":"https:\/\/www.mySiteName.com\/product\/productName\/","image_url":"https:\/\/www.mySiteName.com\/dir\/..\/uploads\/productImage.png"}],"custom_id":"10116","invoice_id":"10116","soft_descriptor":"Soft"}}]"},"response":{"headers":{},"body":"{"name":"UNPROCESSABLE_ENTITY","details":[{"issue":"ORDER_ALREADY_COMPLETED","description":"The order cannot be patched after it is completed."}],"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"f857148c65811","links":[{"href":"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ORDER_ALREADY_COMPLETED","rel":"information_link","method":"GET"}]}","response":{"code":422,"message":"Unprocessable Entity"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}}}

    2024-12-17T08:01:29+00:00 Warning Failed to process WC order 10116: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ORDER_ALREADY_COMPLETED.

    Any idea why that could be?

    Note that I was previously using the legacy paypal standard extension.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter chchch

    (@goch)

    ok, more info:
    I also have some 422 errors in the paypal sandbox logs, like this one:

    {
    "additional_properties": {},
    "body": {
    "name": "UNPROCESSABLE_ENTITY",
    "details": [
    {
    "issue": "ORDER_ALREADY_COMPLETED",
    "description": "The order cannot be patched after it is completed."
    }
    ],
    "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
    "debug_id": "f7867825a71d1",
    "links": [
    {
    "href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ORDER_ALREADY_COMPLETED",
    "rel": "information_link",
    "method": "GET"
    }
    ]
    },
    "duration_time": "xxxxxx",
    "header": {
    "APPLICATION_ID": "APP-80W284485P519543T",
    "Access-Control-Expose-Headers": "xxxxxx",
    "BORDER-IP": "xxxxxx",
    "CALLER_ACCT_NUM": "S2ZG3BZMDVUCL",
    "Date": "Tue, 17 Dec 2024 08:51:13 GMT",
    "Keep-Alive": "xxxxxx",
    "PROCESSING-IP": "xxxxxx",
    "PayPal-Gateway-Metadata": "xxxxxx",
    "SERVER_INFO": "xxxxxx",
    "Server-Timing": "xxxxxx",
    "paypal-debug-id": "f7867825a71d1"
    },
    "status": 422
    }

    • This reply was modified 2 months, 2 weeks ago by chchch.
    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @goch

    Thank you for reaching out with the details.

    “ORDER_ALREADY_COMPLETED” often happens in sandbox mode when you connect the plugin using sandbox account A and then try to place an order with the same account. To avoid this, you need to either clear the cache or log out from the PayPal iframe window where account A was active. After logging out, use a different sandbox account (account B). To ensure a clean process, add the items to the cart again and start the payment process from the beginning. It is an edge case scenario specific to sandbox mode and usually does not occur in a live environment. For this reason, the order will not process successfully in sandbox mode, which is why its status remains stuck.

    Regarding the logs from your second message:

            "name": "REFUSED_MARK_REF_TXN_NOT_ENABLED",

    This API call is made to verify if the ‘Reference Transaction’ feature is enabled for your PayPal merchant account. This check is routine and essential for managing recurring payments or securely storing customer payment details.

    You can safely ignore these errors as they are unrelated to the issue you’ve raised.

    If you have any further questions or need assistance testing, please let me know.

    Kind Regards,

    Krystian

    Thread Starter chchch

    (@goch)

    I really made sure to connect with a different sandbox account (I cleaned the cache/cookies, and used a different browser), but I’m affraid I still have the same 422 error:

    {
    "additional_properties": {},
    "body": {
    "name": "UNPROCESSABLE_ENTITY",
    "details": [
    {
    "issue": "ORDER_ALREADY_COMPLETED",
    "description": "The order cannot be patched after it is completed."
    }
    ],
    "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
    "debug_id": "f689285c03b11",
    "links": [
    {
    "href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ORDER_ALREADY_COMPLETED",
    "rel": "information_link",
    "method": "GET"
    }
    ]
    },
    "duration_time": "xxxxxx",
    "header": {
    "APPLICATION_ID": "APP-80W284485P519543T",
    "Access-Control-Expose-Headers": "xxxxxx",
    "BORDER-IP": "xxxxxx",
    "CALLER_ACCT_NUM": "S2ZG3BZMDVUCL",
    "Date": "Tue, 17 Dec 2024 10:42:34 GMT",
    "Keep-Alive": "xxxxxx",
    "PROCESSING-IP": "xxxxxx",
    "PayPal-Gateway-Metadata": "xxxxxx",
    "SERVER_INFO": "xxxxxx",
    "Server-Timing": "xxxxxx",
    "paypal-debug-id": "f689285c03b11"
    },
    "status": 422
    }

    Anything else you can think of / I could check?

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @goch

    We suggest you contact us directly for further assistance. We may need to examine your system report or logs to better understand what’s happening. You can open a ticket with our service desk. Here’s how you can request support:?Request Support.

    Please make sure to include the URL of this thread in your ticket for reference.

    Kind regards,
    Krystian

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @goch

    Since the issue has been moved to the private support board, we consider this thread resolved.
    If you still have any questions or if a new problem arises, don’t hesitate to open a new thread.

    Kind regards,
    Krystian

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.