actions.order.get() unaccessible attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, in my code for onApprove(), I call actions.order.get(). I get back a json object containing some information I need (like email). I run this piece of code:
console.log(actions.order.get())
this object and this is what I get
n {
- dispatching: false
- error: Error: Api: /smart/api/order/0UG751686A598303J .....
- errorHandled: false
- handlers: []
- rejected: true
- resolved: false
- stack: undefined
- value: undefined
- __proto__: Object}
Now I want to access the value attribute which contains the payer's information.
console.log(actions.order.get().error). I get 'undefined' back.
I really need the information in value attribute, but somehow the only attributes I seem like I can access are: 'resolved', 'rejected', 'errorHandled', 'handlers'.
To confirm this,
console.log(JSON.stringify(actions.order.get())) shows:
{"resolved":false,"rejected":false,"errorHandled":false,"handlers":[]}
Is paypal restricting me on what information I can access? I it seems like I have access to some attributes and not others (the more important ones).
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- How to get 3DS2 OTP verification page for Advanced Checkout? in REST APIs
- Card processing with 3D secure return URL in REST APIs
- I got an error with saving paypal during payment function in REST APIs
- Request is not well-formed, error in json in REST APIs