Service Call: BillUser
public BillUser ( |
||
$billUserReq | ||
$apiCredential | mixed | - Optional API credential - can either be a username configured in sdk_config.ini or a ICredential object created dynamically |
Résultat |
$MPPaymentDetails->Handling = new BasicAmountType($currencyId, $_REQUEST['handling']); $MPPaymentDetails->Tax = new BasicAmountType($currencyId, $_REQUEST['tax']); $MPPaymentDetails->PaymentType = $_REQUEST['paymentCodeType']; $MPPaymentDetails->EmailSubject = $_REQUEST['mailSubject']; $MPPaymentDetails->ItemName = $_REQUEST['itemName']; $MPPaymentDetails->ItemNumber = $_REQUEST['itemNum']; $MPPaymentDetails->Memo = $_REQUEST['memo']; $MPPaymentDetails->MpID = $_REQUEST['billingAgreementID']; $billUserReqest = new BillUserRequestType(); $billUserReqest->MerchantPullPaymentDetails = $MPPaymentDetails; $billUserReq = new BillUserReq(); $billUserReq->BillUserRequest = $billUserReqest; /* * ## 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 */ $billUserResponse = $paypalService->BillUser($billUserReq); } catch (Exception $ex) { include_once "../Error.php"; exit; } if (isset($billUserResponse)) { echo "<pre>"; print_r($billUserResponse); echo "</pre>"; } require_once '../Response.php';