Jump to content

DavLn

New Members
  • Posts

    5
  • Joined

  • Last visited

DavLn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I tried to put a value in "code" but I got an endless list of errors...And I attached the list of errors I got putting a value in "code". This is the code : <?php require("vendor/autoload.php"); //... $authProvider = new \RevolutPHP\Auth\Provider([ 'clientId' => '{clientId}', // As shown when uploading your key 'privateKey' => 'sk_F7PVCXsUUMlQpGRYz3lN1Yxd-KsGkdYbjVbFugwPoWkvvqGOukcnlajxTOS8mrNV', 'redirectUri' => 'pk_HiQdMyLEmjpHBnAemaaklQqatz2pTfzdJrRCEhn0rAVqrxZK', // The URL to redirect the user to after the authorisation step 'isSandbox' => true ]); // redirect the user to the authorization flow in the Revolut for Business app // echo $url = $authProvider->getAuthorizationUrl(); // Authorized user -> authorization code against an access token if(isset($_GET['code'])){ $accessToken = $authProvider->getAccessToken('authorization_code', [ 'code' => $_GET['code'] ]); } else{ // error - no code } ?>
  2. <?php require("vendor/autoload.php"); //... $authProvider = new \RevolutPHP\Auth\Provider([ 'clientId' => '{clientId}', // As shown when uploading your key 'privateKey' => 'sk_F7PVCXsUUMlQpGRYz3lN1Yxd-KsGkdYbjVbFugwPoWkvvqGOukcnlajxTOS8mrNV', 'redirectUri' => 'pk_HiQdMyLEmjpHBnAemaaklQqatz2pTfzdJrRCEhn0rAVqrxZK', // The URL to redirect the user to after the authorisation step 'isSandbox' => true ]); // redirect the user to the authorization flow in the Revolut for Business app echo $url = $authProvider->getAuthorizationUrl(); // Authorized user -> authorization code against an access token $accessToken = $authProvider->getAccessToken('authorization_code', [ 'code' => $_GET['code'] ]); ?> Sorry, I forgot to post my code, but the link is safe, it's a link to a tutorial on the API that I'm following. And the error is on line 14
  3. I do everything in sandbox mode but I'm blocked at this part: RevolutPHP\Auth\Provider And I get this error: Undefined array key "code" Thank you in advance for your help and advice. This is the guide, i use (https://github.com/sverraest/revolut-php)
  4. Hello, I don't really see how to integrate payment via RevolUt into my website despite having read the documentation from the official RevolUt website. Please give me some advice. Have a good day !
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.