/v2/checkout/orders returned status 422 in sandbox environment using test card
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using test cards provided by PayPal ( 4000000000000002, 5200000000000007, 340000000003961), we keep running into error status 422 when attempting to checkout with Advanced Card (instead of PayPal button):
hosted-fields-payments-sdk-tokenization-frame.min.html:1
POST https://cors.api.sandbox.paypal.com/v2/checkout/orders/2JU35357EN4831545/validate-payment-method 422
hosted-fields-payments-sdk-tokenization-frame.min.html:1
XHR failed loading: POST "https://cors.api.sandbox.paypal.com/v2/checkout/orders/2JU35357EN4831545/validate-payment-method".
Note that these card numbers are supposed to offer successful 3DS authentication. Using card numbers 4000000000000101 (passive authentication) and 4000000000000051 (not enrolled) however, orders go through just fine.
Some debug log:
2021-10-01 11:26:02 - PayPal debug (PayPal Info): {"partner_id":"EJNHWRJJNB38L","client_id":"***REMOVED***","secret":"***REMOVED***","environment":"sandbox"}
2021-10-01 11:26:02 - PayPal debug (PayPal Order Info): {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","description":"Your order 50176","invoice_id":"50176","shipping":{"name":{"full_name":"John Doe"},"address":{"address_line_1":"1 Main St","address_line_2":"","admin_area_1":"California","admin_area_2":"San Jose","postal_code":"95131","country_code":"US"}},"items":[{"name":"LED Bulb","sku":"222WW","url":"https:\/\/www.oursite.com\/index.php?route=product\/product&product_id=52","quantity":"1","unit_amount":{"currency_code":"USD","value":"0.01"}}],"amount":{"currency_code":"USD","value":"0.01","breakdown":{"item_total":{"currency_code":"USD","value":"0.01"},"tax_total":{"currency_code":"USD","value":"0.00"},"shipping":{"currency_code":"USD","value":"0.00"},"handling":{"currency_code":"USD","value":0},"discount":{"currency_code":"USD","value":0}}}}],"application_context":{"shipping_preference":"SET_PROVIDED_ADDRESS"}}
2021-10-01 11:26:03 - PayPal debug (Create Order): {"id":"8M250912P5600324J","status":"CREATED","links":[{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/8M250912P5600324J","rel":"self","method":"GET"},{"href":"https:\/\/www.sandbox.paypal.com\/checkoutnow?token=8M250912P5600324J","rel":"approve","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/8M250912P5600324J","rel":"update","method":"PATCH"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/8M250912P5600324J\/capture","rel":"capture","method":"POST"}]}
We are trying to integrate the PayPal Commerce Platform module (v1.4.0) into OpenCart (v2.1.0.1).
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below is the response details of the status 422 from another try using test card 4000000000000002. Hope the additional information is useful.
XHRPOSThttps://cors.api.sandbox.paypal.com/v2/checkout/orders/5BV74099AE830864L/validate-payment-method
[HTTP/2 422 Unprocessable Entity 4710ms]
name "UNPROCESSABLE_ENTITY"
details [ {…} ]
0 Object { issue: "CONTINGENCY", description: "Buyer needs to resolve following contingency before proceeding with payment" }
issue "CONTINGENCY"
description "Buyer needs to resolve following contingency before proceeding with payment"
message "The requested action could not be performed, semantically incorrect, or failed business validation."
links [ {…}, {…} ]
0 Object { href: "https://www.sandbox.paypal.com/webapps/helios?action=verify&flow=3ds&cart_id=5BV74099AE830864L", rel: "3ds-contingency-resolution", method: "GET" }
href "https://www.sandbox.paypal.com/webapps/helios?action=verify&flow=3ds&cart_id=5BV74099AE830864L"
rel "3ds-contingency-resolution"
method "GET"
1 Object { href: "https://developer.paypal.com/docs/api/errors/#contingency", rel: "information_link", method: "GET" }
href "https://developer.paypal.com/docs/api/errors/#contingency"
rel "information_link"
method "GET"
debug_id "d77c8e596dc21"
informationLink "https://developer.paypal.com/docs/api/orders#errors"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ledinc I am also stuck with same exact error since last 3 days.
Can you please help if you were able to resolve the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you ever resolve this? We have exactly the same issue and cannot seem to find a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Carrot3
I saw in another thread that you were able to somehow bypass all the bugs?
Could you please share with the rest of us that are still struggling to get around this error? I've been stuck for 3 days in this...
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @liinature ,
Thank you for posting to the PayPal Merchant Community.
If you have integrated with Advanced Debit and Credit Cards, here is the documentation on testing 3D Secure:
https://developer.paypal.com/docs/checkout/advanced/customize/3d-secure/
Here is the API details:
https://developer.paypal.com/docs/checkout/advanced/customize/3d-secure/api/
Here are the test card numbers:
https://developer.paypal.com/docs/checkout/advanced/customize/3d-secure/test/
Make certain you choose one of the countries available for testing, use the CVV and Exp Date that is listed, and then use any of the cards listed for testing.
Each card number will give a specific response.
Thank you,
Jennifer
MTS
PayPal
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Venmo is not eligible - Unable to render Venmo button using SDK v5 in live mode in SDKs
- SOAP Error - CreateRecurringPaymentsProfileResponseType returns ACK => NULL in NVP/SOAP APIs
- [BUG] Sandbox subscription create checkout session - Error 400 in Sandbox Environment
- Webhooks from PayPal Sandbox are not sending any JSON data, just headers in Sandbox Environment
- Failed to process the payment. Please try again or contact the shop admin. in REST APIs