actions.order.get() unaccessible attributes

felesterio
New Community Member

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 {

    1. dispatching: false
    2. error: Error: Api: /smart/api/order/0UG751686A598303J .....
    3. errorHandled: false
    4. handlers: []
    5. rejected: true
    6. resolved: false
    7. stack: undefined
    8. value: undefined
    9. __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).

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.