Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment /pay authorization problem #23

Open
tomekhun opened this issue Apr 4, 2022 · 1 comment
Open

Payment /pay authorization problem #23

tomekhun opened this issue Apr 4, 2022 · 1 comment

Comments

@tomekhun
Copy link

tomekhun commented Apr 4, 2022

Dears!

First of all thank you for this package! Really easy to integrate!

I ran into a problem, which i couldnt solve as of now.

I'm trying everything in sandbox mode. Authorization working perfectly. Counterparty creation is also flawless.

Altough when i try anything else it goes into forbidden.

During authoriazion i tried to add different scopes but does not change the permission that the app-confirm is giving (payments, accounts, etc).

All the time i try to do a transfer of payment i get back a 403:

"message": "Client error: POST https://sandbox-b2b.revolut.com/api/1.0/pay resulted in a 403 Forbidden response:\n{"message":"This action is forbidden","code":9002}\n"

I know that the problem is on my end, but i'm unable to figure it out.

Any help is appreciated!

Regards
Tom

@Yuzmi
Copy link

Yuzmi commented Oct 5, 2022

I also got this issue recently, it came from the getAuthorizationUrl() method.
I used it to redirect the user to Revolut but the default scope is only READ.
The provided access token only lets you retrieve data, nothing more.

You must add WRITE (for counterparty creation, etc...) and/or PAY (for payments).
return $this->getAuthProvider()->getAuthorizationUrl(['scope' => "READ,WRITE,PAY"]);

You don't have this issue if you do it directly from the Revolut website.

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants