forked from LiveCarta/PayPal-PHP-SDK
Updates to Future Payment Sample
- Renamed CorrelationId to ClientMetadataId - Updated Source and Docs
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user