-
Notifications
You must be signed in to change notification settings - Fork 17
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
Problem with access to the account #11
Comments
Hi, You try to pass the Revolut code without authenticate your Revolut access. Hope this could help.
Here is the most important thing
|
Not exacly. Can you make the step by step instrusction? Beetween installing software and setting things into revolut business account? Thank you |
Hi, you should follow instructions described and test my solution. Regards |
Please permit me to show the problem by telegram. |
I don't use telegram sorry, but i can support you here. |
Ok sorry it was only for real time problem solving. By the way. I get all the staff as you described. But it still get that error and i don't understand where is the problem. Are you sure that there wasn'ylt any change into revolut rules about part of key management that could give me some kind of errors? Because i saw they implemented a new staff like json web token. |
I am discovering the library actually.
That's simple. Your variable is not set if you don't have ?code=xxxxxxxxxxxxxx in your URL. If you want my code working, you have to set the REQUEST URI in your Revolut account to be the same as your php webpage. I don't know exactly if it is a good practice, as i am discovering the library. In my account, my request URI is https://mywebsite.com/revolut/oauth.php I'm sure a developper could help us regarding this problem. |
Uhm. I go to sleep now. Please check this chat in the next days. I will create a dedicated file like whatever.php And will see |
Please try this code, it should output an URL.
|
Ok i try it now |
You may access Revolut Authentification webpage. Connect to your account, and input your sms code. In case of success, you may be redirected to your request URI set in your Revolut Business account. |
If you get an error, just copy the last line of your apache or nginx apache log here. |
on running that code i have a blank page: let me show you, i just gonna change my domain due to the privacy reasons: this is the link after sms. (as you see i sent it to direction "amministrazione" so to index of that direction. than i run into https://mydomain.com/payments/ this code require "vendor/autoload.php"; $authProvider = new \RevolutPHP\Auth\Provider([ and nothing happn |
Just add “echo” before $url.
And hide your client id it’s better 😉
Le lun. 9 mars 2020 à 02:59, octapudus <[email protected]> a écrit :
… on running that code i have a blank page:
let me show you, i just gonna change my domain due to the privacy reasons:
only domain will be changed (and also some characters of key)
this is the link after sms. (as you see i sent it to direction
"amministrazione" so to index of that direction.
https://mydomain.com/amministrazione/?code=oa_prod_qbFSGdBw6ZD9pTStDHpLO4lMq4Zn8YJn_gnUW5M3SSQ&state=
than i run into https://mydomain.com/payments/ this code
require "vendor/autoload.php";
$authProvider = new \RevolutPHP\Auth\Provider([
'clientId' => 'kX0mpaJdri-IB6zhtUGHNJFZeV6rWtWEw1DY6FacRQM', // As shown
when uploading your key
'privateKey' => 'file:///var/www/www-root/data/www/
mydomanin.com/payments/test/privatekey.pem',
'redirectUri' => 'https://mydomanin.com/amministrazione/', // The URL to
redirect the user to after the authorisation step
'isSandbox' => false
]);
$url = $authProvider->getAuthorizationUrl();
and nothing happn
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=AOYVHC743CBNKYH7UHPAVLLRGRER3A5CNFSM4K73LDT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFMXSI#issuecomment-596298697>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOYVHC7ZCUWVO262TZ6PLK3RGRER3ANCNFSM4K73LDTQ>
.
|
yeah sure, i put random digits of the same lenght, it's not mine client id :) but the way now i see, there is the link. (again with random digits that i will put) now im trying to take the access token which i need in order to access to my account. than the errors starts: $accessToken = $authProvider->getAccessToken('authorization_code', [ tice: Undefined index: code in /var/www/www-root/data/www/mydomain.com/payments/index.php on line 53 Fatal error: Uncaught BadMethodCallException: Required parameter not passed: "code" in /var/www/www-root/data/www/mydomain.com/payments/vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php:35 Stack trace: #0 /var/www/www-root/data/www/mydomain.com/payments/vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php(53): League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameter('code', Array) #1 /var/www/www-root/data/www/mydomain.com/payments/vendor/league/oauth2-client/src/Grant/AbstractGrant.php(76): League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameters(Array, Array) #2 /var/www/www-root/data/www/mydomain.com/payments/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(535): League\OAuth2\Client\Grant\AbstractGrant->prepareRequestParameters(Array, Array) #3 /var/www/www-root/data/www/mydomain.com/payments/vendor/vdbelt/oauth2-revolut/src/Provider/Revolut.php(144): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(Object(League\OAuth2\Client\Grant\AuthorizationCode), Array) #4 /v in /var/www/www-root/data/www/mydomain.com/payments/vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php on line 35 |
can you just share your code please? @Cyrilouletouriste |
Hey i set everything as you described, i think.
///php code
require "vendor/autoload.php";
$authProvider = new \RevolutPHP\Auth\Provider([
'clientId' => 'BLABLABLAmyid', // As shown when uploading your key
'privateKey' => 'blablabla/pathto my private key/privatekey.pem',
'redirectUri' => 'web link that i indicated into public key', // The URL to redirect the user to after the authorisation step
'isSandbox' => true
]);
$url = $authProvider->getAuthorizationUrl();
$accessToken = $authProvider->getAccessToken('authorization_code', [
'code' => $_GET['code']
]);
but still it's giving this error:
i will hide my path to the privacy reasons with "myDirectoryToSourceCOde*"
Fatal error: Uncaught BadMethodCallException: Required parameter not passed: "code" in myDirectoryToSourceCOdevendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php:35 Stack trace: #0 myDirectoryToSourceCOdevendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php(53): League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameter('code', Array) #1 myDirectoryToSourceCOdevendor/league/oauth2-client/src/Grant/AbstractGrant.php(76): League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameters(Array, Array) #2 myDirectoryToSourceCOdevendor/league/oauth2-client/src/Provider/AbstractProvider.php(535): League\OAuth2\Client\Grant\AbstractGrant->prepareRequestParameters(Array, Array) #3 myDirectoryToSourceCOdevendor/vdbelt/oauth2-revolut/src/Provider/Revolut.php(144): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(Object(League\OAuth2\Client\Grant\AuthorizationCode), Array) #4 /v in myDirectoryToSourceCOdevendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php on line 35
The text was updated successfully, but these errors were encountered: