How to approve order from response links of create order api using paypal's javascript sdk?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to implement paypal advanced credit and debit cards payments using javascript sdk on client side. I am using the following example as reference https://developer.paypal.com/docs/business/checkout/advanced-card-payments/services.
I have created the order, got links as response, how to approve the order using the approve url link as the user is using credit card details for payment without paypal login before performing order capture.
I know that it is not best approach for this implementation. firstly i want to try out this example as given in paypal docs.i will implement it in server side later to avoid security vulnerabilities.
Code Place in Reply Box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
after executing above snippet, getting this as response
{name: "UNPROCESSABLE_ENTITY", details: [{issue: "ORDER_NOT_APPROVED",…}],…} debug_id: "a63fbc3806995" details: [{issue: "ORDER_NOT_APPROVED",…}] 0: {issue: "ORDER_NOT_APPROVED",…} links: [{href: "https://developer.paypal.com/docs/api/orders/v2/#error-ORDER_NOT_APPROVED",…}] 0: {href: "https://developer.paypal.com/docs/api/orders/v2/#error-ORDER_NOT_APPROVED",…} message: "The requested action could not be performed, semantically incorrect, or failed business validation." name: "UNPROCESSABLE_ENTITY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're receiving that response as the order hasn't been approved.
The buyer needs to be re-directed to the approval URL, where they will get the option to login to an account to approve the payment or where available, pay using debit/credit card without using an account.
(note : guest checkout is not a payment method which is guaranteed to be available for every buyer checkout session)
Thanks !
Was my post helpful? If so, please give me a kudos!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Error: "Unable to change shipping method. Please try again." in PayPal popup in REST APIs
- API - Change currency when shipping country changes in SDKs
- Can't Save PayPal for purchase later with the Javascript SDK, unable to pass setup token in SDKs
- OpenCart PayPal Express Checkout Problem Occured but no Error response in Log in NVP/SOAP APIs
- PayPal REST API Get Order Response for Venmo in REST APIs