Fixing Future Payment Sample

This commit is contained in:
Jay Patel
2015-07-21 11:23:41 -05:00
parent 9caf75ee82
commit 36f0dd7de9
3 changed files with 79 additions and 54 deletions

View File

@@ -67,10 +67,10 @@ $clientMetadataId = '123123456';
try {
// Exchange authorization_code for long living refresh token. You should store
// it in a database for later use
//$refreshToken = FuturePayment::getRefreshToken($authorizationCode, $apiContext);
echo $refreshToken;
$refreshToken = FuturePayment::getRefreshToken($authorizationCode, $apiContext);
// Update the access token in apiContext
$payment->updateAccessToken('NvtsgQLDxJXfFTOpYRS5Ad9S1kOd_QWCk4vkdPuBe9qDfKDBbKyioSMXeMwSaLKr4Lz_zoFEpZBiHrce4X4IcAfabH0', $apiContext);
$payment->updateAccessToken($refreshToken, $apiContext);
// For Sample Purposes Only.
$request = clone $payment;