PayPal\Service\PayPalAPIInterfaceServiceService::DoCapture PHP Method

DoCapture() public method

Service Call: DoCapture
public DoCapture ( DoCaptureReq $doCaptureReq, mixed $apiCredential = null ) : DoCaptureResponseType
$doCaptureReq PayPal\PayPalAPI\DoCaptureReq
$apiCredential mixed - Optional API credential - can either be a username configured in sdk_config.ini or a ICredential object created dynamically
return PayPal\PayPalAPI\DoCaptureResponseType
    public function DoCapture($doCaptureReq, $apiCredential = null)
    {
        $apiContext = new PPApiContext($this->config);
        $handlers = array(new PPMerchantServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION));
        $this->setStandardParams($doCaptureReq->DoCaptureRequest);
        $ret = new DoCaptureResponseType();
        $resp = $this->call('PayPalAPIAA', 'DoCapture', $doCaptureReq, $apiContext, $handlers);
        $ret->init(PPUtils::xmlToArray($resp));
        return $ret;
    }