- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using a server-side call (Java SDK) to setup an authorization. The logs below show that is successful as expected:
: PayPal Status Code: 201
: PayPal Status: CREATED
[Removed. Phone #s not permitted]6860D
: PayPal Intent: AUTHORIZE
: PayPal Total Amount: USD 2.00
When it returns to the client and the client-side attempts to contact PayPal, this error is thrown from the JS:
Uncaught Error: Expected intent from order api call to be capture, got authorize. Please ensure you are passing intent=authorize to the sdk
Any idea what I'm doing wrong? My server-side unit tests all complete with no issues.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the issue....needed to include 'intent=authorize' on the JS reference.
Since I won't know for certain if I'm doing an authorization or transaction until after the user clicks the PayPal button and my server is contacted, guess I'll just set it when the page is loaded and some will go through the authorization route unnecessarily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the issue....needed to include 'intent=authorize' on the JS reference.
Since I won't know for certain if I'm doing an authorization or transaction until after the user clicks the PayPal button and my server is contacted, guess I'll just set it when the page is loaded and some will go through the authorization route unnecessarily.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Change the button from Sandbox to Production in REST APIs
- When I do PayPal capture Order, I keep on getting Invalid Request Connection in REST APIs
- API TRANSACTION_REFUSED in Sandbox when Capturing Payment in REST APIs
- Simple Paypal button integration results in 404 error in Sandbox Environment
- Getting API error PAYEE_ACCOUNT_INVALID, I set the payee to my merchant id. in REST APIs