From 6a38a6b27523200061afde4202f14b32ceaf85ce Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 25 Nov 2017 12:16:29 -0600 Subject: [PATCH] Add `amount` initialization in sample --- sample/payments/RefundCapture.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sample/payments/RefundCapture.php b/sample/payments/RefundCapture.php index 9d9218d..0c288fc 100644 --- a/sample/payments/RefundCapture.php +++ b/sample/payments/RefundCapture.php @@ -13,8 +13,12 @@ use PayPal\Api\RefundRequest; // ### Refund // Create a refund object indicating // refund amount and call the refund method +$amount = new Amount(); +$amount->setCurrency("USD") + ->setTotal(20); + $refundRequest = new RefundRequest(); -$refundRequest->setAmount($amt); +$refundRequest->setAmount($amount); // Replace $captureId with any static Id you might already have. $captureId = "";