PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
payments
/
paypal-merchant-sdk
/
samples
/
ExpressCheckout
<?php require_once '../PPBootStrap.php'; session_start(); /* * # GetExpressCheckout API The GetExpressCheckoutDetails API operation obtains information about an Express Checkout transaction. This sample code uses Merchant PHP SDK to make API call */ /* * A timestamped token, the value of which was returned by `SetExpressCheckout` response. */ $token = $_REQUEST['token']; $getExpressCheckoutDetailsRequest = new GetExpressCheckoutDetailsRequestType($token); $getExpressCheckoutReq = new GetExpressCheckoutDetailsReq(); $getExpressCheckoutReq->GetExpressCheckoutDetailsRequest = $getExpressCheckoutDetailsRequest; /* * ## Creating service wrapper object Creating service wrapper object to make API call and loading Configuration::getAcctAndConfig() returns array that contains credential and config parameters */ $paypalService = new PayPalAPIInterfaceServiceService(Configuration::getAcctAndConfig()); try { /* wrap API method calls on the service object with a try catch */ $getECResponse = $paypalService->GetExpressCheckoutDetails($getExpressCheckoutReq); } catch (Exception $ex) { include_once '../Error.php'; exit; } if (isset($getECResponse)) { echo '<table>'; echo "<tr><td>Ack :</td><td><div id='Ack'>".$getECResponse->Ack.'</div> </td></tr>'; echo "<tr><td>Token :</td><td><div id='Token'>".$getECResponse->GetExpressCheckoutDetailsResponseDetails->Token.'</div></td></tr>'; echo "<tr><td>PayerID :</td><td><div id='PayerID'>".$getECResponse->GetExpressCheckoutDetailsResponseDetails->PayerInfo->PayerID.'</div></td></tr>'; echo "<tr><td>PayerStatus :</td><td><div id='PayerStatus'>".$getECResponse->GetExpressCheckoutDetailsResponseDetails->PayerInfo->PayerStatus.'</div></td></tr>'; echo '</table>'; echo '<pre>'; print_r($getECResponse); echo '</pre>'; } require_once '../Response.php';
[+]
..
[-] GetExpressCheckout.html.php
[edit]
[-] GetExpressCheckout.php
[edit]
[-] DoExpressCheckout.php
[edit]
[-] DGsetEC.html.php
[edit]
[-] DGsetExpressCheckout.php
[edit]
[-] DGdoExpressCheckout.php
[edit]
[-] SetExpressCheckout.php
[edit]
[-] SetExpressCheckout.html.php
[edit]
[-] DoExpressCheckout.html.php
[edit]