Updates to Future Payment Sample

- Renamed CorrelationId to ClientMetadataId
- Updated Source and Docs
This commit is contained in:
japatel
2015-01-09 14:16:30 -06:00
parent e665662688
commit 291ce9c160
5 changed files with 65 additions and 1508 deletions

View File

@@ -59,8 +59,9 @@ $payment->setIntent("authorize")
// authorization code from mobile sdk
$authorizationCode = 'EJfRuAqXEE95pdVMmOym_mftTbeJD03RBX-Zjg9pLCAhdLqLeRR6YSKTNsrbQGX7lFoZ3SxwFyxADEZbBOxpn023W9SA0JzSQAy-9eLdON5eDPAyMyKlHyNVS2DqBR2iWVfQGfudbd9MDoRxMEjIZbY';
// correlation id from mobile sdk
$correlationId = '123123456';
// Client Metadata id from mobile sdk
// For more information look for PayPal-Client-Metadata-Id in https://developer.paypal.com/docs/api/#authentication--headers
$clientMetadataId = '123123456';
try {
// Exchange authorization_code for long living refresh token. You should store
@@ -81,7 +82,7 @@ try {
// url to which the buyer must be redirected to
// for payment approval
// Please note that currently future payments works only with PayPal as a funding instrument.
$payment->create($apiContext, $correlationId);
$payment->create($apiContext, $clientMetadataId);
} catch (Exception $ex) {
ResultPrinter::printError("Future Payment", "Payment", null, $request, $ex);