Service Call: DoNonReferencedCredit
public DoNonReferencedCredit ( |
||
$doNonReferencedCreditReq | ||
$apiCredential | mixed | - Optional API credential - can either be a username configured in sdk_config.ini or a ICredential object created dynamically |
return |
$doNonRefCreditRequestDetails->Comment = $_REQUEST['comment']; $doNonRefCreditRequestDetails->NetAmount = $itemAmount; $doNonRefCreditRequestDetails->ShippingAmount = $shippingAmount; $doNonRefCreditRequestDetails->TaxAmount = $taxAmount; $doNonRefCreditRequestDetails->Amount = $totalamount; $doNonRefCreditRequest = new DoNonReferencedCreditRequestType(); $doNonRefCreditRequest->DoNonReferencedCreditRequestDetails = $doNonRefCreditRequestDetails; $doNonRefCreditReq = new DoNonReferencedCreditReq(); $doNonRefCreditReq->DoNonReferencedCreditRequest = $doNonRefCreditRequest; /* * ## 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 */ $doNonRefCreditResponse = $paypalService->DoNonReferencedCredit($doNonRefCreditReq); } catch (Exception $ex) { include_once "../Error.php"; exit; } if (isset($doNonRefCreditResponse)) { echo "<table>"; echo "<tr><td>Ack :</td><td><div id='Ack'>{$doNonRefCreditResponse->Ack}</div> </td></tr>"; echo "</table>"; echo "<pre>"; print_r($doNonRefCreditResponse); echo "</pre>"; } require_once '../Response.php';