cancel
Showing results for 
Search instead for 
Did you mean: 

actions.order.get() unaccessible attributes

New Community Member

actions.order.get() unaccessible attributes

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).