Add amount initialization in sample

This commit is contained in:
Jay
2017-11-25 12:16:29 -06:00
committed by GitHub
parent 5fcdb2195d
commit 6a38a6b275

View File

@@ -13,8 +13,12 @@ use PayPal\Api\RefundRequest;
// ### Refund // ### Refund
// Create a refund object indicating // Create a refund object indicating
// refund amount and call the refund method // refund amount and call the refund method
$amount = new Amount();
$amount->setCurrency("USD")
->setTotal(20);
$refundRequest = new RefundRequest(); $refundRequest = new RefundRequest();
$refundRequest->setAmount($amt); $refundRequest->setAmount($amount);
// Replace $captureId with any static Id you might already have. // Replace $captureId with any static Id you might already have.
$captureId = "<your authorization id here>"; $captureId = "<your authorization id here>";