GetExpressCheckoutDetailsRequest = $getExpressCheckoutDetailsRequest; $paypalService = new PayPalAPIInterfaceServiceService(); 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; } //---------------------------------------------------------------------------- $orderTotal = new BasicAmountType(); $orderTotal->currencyID = $_REQUEST['currencyCode']; $orderTotal->value = $_REQUEST['amt']; $paymentDetails= new PaymentDetailsType(); $paymentDetails->OrderTotal = $orderTotal; if(isset($_REQUEST['notifyURL'])) { $paymentDetails->NotifyURL = $_REQUEST['notifyURL']; } $DoECRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType(); $DoECRequestDetails->PayerID = $payerId; $DoECRequestDetails->Token = $token; $DoECRequestDetails->PaymentAction = $paymentAction; $DoECRequestDetails->PaymentDetails[0] = $paymentDetails; $DoECRequest = new DoExpressCheckoutPaymentRequestType(); $DoECRequest->DoExpressCheckoutPaymentRequestDetails = $DoECRequestDetails; $DoECReq = new DoExpressCheckoutPaymentReq(); $DoECReq->DoExpressCheckoutPaymentRequest = $DoECRequest; try { /* wrap API method calls on the service object with a try catch */ $DoECResponse = $paypalService->DoExpressCheckoutPayment($DoECReq); } catch (Exception $ex) { include_once("../Error.php"); exit; } if(isset($DoECResponse)) { echo ""; echo ""; if(isset($DoECResponse->DoExpressCheckoutPaymentResponseDetails->PaymentInfo)) { echo ""; } echo "
Ack :
$DoECResponse->Ack
TransactionID :
". $DoECResponse->DoExpressCheckoutPaymentResponseDetails->PaymentInfo[0]->TransactionID."
"; echo "
";
	print_r($DoECResponse);
	echo "
"; } require_once '../Response.php';