Quote Originally Posted by Jeff_Mash View Post
Glad to help find that!
Hey Cindy - I manually changed the name of the function to sendAlertEmail() and tried again. This time, I get an actual error message on the OPC page:

"We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance."

Looking at the debug log file, it seems to indicate that this transaction was previously authorized:

Code:
024-06-21 14:25:37: (checkout_one_confirmation) ==> Start confirmPaymentSource
TokenCache::get, using saved access-token; expires in 32322 seconds.
The curlPost (v2/checkout/orders/0K792404TN0597925/confirm-payment-source) request was unsuccessful.
{
    "errNum": 422,
    "errMsg": "An interface error (422) was returned from PayPal.",
    "curlErrno": 0,
    "name": "UNPROCESSABLE_ENTITY",
    "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
    "details": [
        {
            "issue": "ORDER_ALREADY_AUTHORIZED",
            "description": "Order already authorized.If 'intent=AUTHORIZE' only one authorization per order is allowed."
        }
    ],
    "debug_id": "81bd08dcd3053"
}
CURL Options: {
    "78": 10,
    "52": false,
    "75": true,
    "74": true,
    "42": 0,
    "19913": true,
    "13": 45,
    "47": true,
    "10002": "https:\/\/api-m.paypal.com\/v2\/checkout\/orders\/0K792404TN0597925\/confirm-payment-source",
    "10015": "{\"payment_source\":{\"paypal\":{\"name\":{\"given_name\":\"Jeff\",\"surname\":\"Mash\"},\"email_address\":\"email######################\",\"experience_context\":{\"payment_method_preference\":\"IMMEDIATE_PAYMENT_REQUIRED\",\"brand_name\":\"MJM Magic\",\"landing_page\":\"NO_PREFERENCE\",\"shipping_preference\":\"SET_PROVIDED_ADDRESS\",\"user_action\":\"PAY_NOW\",\"return_url\":\"https:\\\/\\\/www.mjmmagic.com\\\/store\\\/ppr_webhook_main.php?op=return\",\"cancel_url\":\"https:\\\/\\\/www.domain.com\\\/store\\\/ppr_webhook_main.php?op=cancel\"}}}}"
}
2024-06-21 14:25:37: (checkout_one_confirmation) ==> End confirmPaymentSourceWe are unable to process your PayPal Checkout payment at this time.  Please contact us for assistance.
************************************************

2024-06-21 14:25:38: (checkout_one) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 32321 seconds.

************************************************
As you can see, it says "Order already authorized.If 'intent=AUTHORIZE' only one authorization per order is allowed."

However, this is a new transaction I am pushing over. Granted, I am using the same user account, same PayPal account, and purchasing the same product. But the original order that successfully submitted has been VOIDED in PayPal. So I don't know why it's still saying "ORDER_ALREADY_AUTHORIZED" since this would be a new order.

Any way to look into that? I can help debug if need be, just let me know or hit me up on Skype.