Files
2026-05-13 09:43:32 -04:00

27 lines
822 B
PHP

<?php
require_once('../PPBootStrap.php');
/**
* Get required parameters from the web form for the request
*/
$logger = new PPLoggingManager('DoDirectPayment');
$amount = new BasicAmountType($_REQUEST['currencyCode'], $_REQUEST['amt']);
$doCaptureReqest = new DoCaptureRequestType($_REQUEST['authID'], $amount, $_REQUEST['completeCodeType']);
$doCaptureReq = new DoCaptureReq();
$doCaptureReq->DoCaptureRequest = $doCaptureReqest;
$paypalService = new PayPalAPIInterfaceServiceService();
try {
/* wrap API method calls on the service object with a try catch */
$doCaptureResponse = $paypalService->DoCapture($doCaptureReq);
} catch (Exception $ex) {
include_once("../Error.php");
exit;
}
if(isset($doCaptureResponse)) {
echo "<pre>";
print_r($doCaptureResponse);
echo "</pre>";
}
require_once '../Response.php';