Orders V2 Capture

hueythecat
Contributor
Contributor

Using the Checkout-PHP-SDK

 

I am unable to capture a payment, my debug output returns:

403,

"name":"NOT_AUTHORIZED"

"details":[{"issue":"PERMISSION_DENIED","description":"You do not have permission to access or perform operations on this resource."}],

"message":"Authorisation failed due to insufficient permissions."

 

Am I missing something in my sandbox setup?

I can see in my dashboard API calls the setup is fine but capture is getting rejected

 

create succeeds -> /v2/checkout/orders

capture fails ->/v2/checkout/orders/[id]/capture

    

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

hueythecat
Contributor
Contributor

So it turned out I had not referenced my client secret var correctly, the fact that the order creation worked threw me off investigating the connection. I spent far too much time down the rabbit hole, debug and a nights sleep are my friend.  

View solution in original post

Login to Me Too
3 REPLIES 3
Solved

hueythecat
Contributor
Contributor

So it turned out I had not referenced my client secret var correctly, the fact that the order creation worked threw me off investigating the connection. I spent far too much time down the rabbit hole, debug and a nights sleep are my friend.  

Login to Me Too

vg100
New Community Member

Oh god, you saved me at least another day of wasting time 🤣

I spent almost the entire day debugging and for the same reason that the first call worked did not think that it could be a token issue 

Login to Me Too

Chicura
Member
Member

So can you explain what "not referenced client secret var" actually means?
Where do I have to reference it?

Login to Me Too

Haven't Found your Answer?

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