public GetBillingAgreementCustomerDetails ( |
||
$getBillingAgreementCustomerDetailsReq | ||
$apiCredential | mixed | - Optional API credential - can either be a username configured in sdk_config.ini or a ICredential object created dynamically |
return |
public function GetBillingAgreementCustomerDetails($getBillingAgreementCustomerDetailsReq, $apiCredential = null)
{
$apiContext = new PPApiContext($this->config);
$handlers = array(new PPMerchantServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION));
$this->setStandardParams($getBillingAgreementCustomerDetailsReq->GetBillingAgreementCustomerDetailsRequest);
$ret = new GetBillingAgreementCustomerDetailsResponseType();
$resp = $this->call('PayPalAPIAA', 'GetBillingAgreementCustomerDetails', $getBillingAgreementCustomerDetailsReq, $apiContext, $handlers);
$ret->init(PPUtils::xmlToArray($resp));
return $ret;
}
/* * The GetBillingAgreementCustomerDetails API operation obtains information about a billing agreement’s PayPal account holder. */ /* * The time-stamped token returned in the SetCustomerBillingAgreement response */ $BACustomerDetailRequest = new GetBillingAgreementCustomerDetailsRequestType($_REQUEST['token']); $BACustomerDetailReq = new GetBillingAgreementCustomerDetailsReq(); $BACustomerDetailReq->GetBillingAgreementCustomerDetailsRequest = $BACustomerDetailRequest; /* * ## 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 */ $BACustomerDetailResponse = $paypalService->GetBillingAgreementCustomerDetails($BACustomerDetailReq); } catch (Exception $ex) { include_once "../Error.php"; exit; } if (isset($BACustomerDetailResponse)) { echo "<table>"; echo "<tr><td>Ack :</td><td><div id='Ack'>{$BACustomerDetailResponse->Ack}</div> </td></tr>"; echo "</table>"; echo "<pre>"; print_r($BACustomerDetailResponse); echo "</pre>"; } require_once '../Response.php';