From aa167765b483183cc0796644d75d74ac2ae9349b Mon Sep 17 00:00:00 2001 From: Silas Montgomery Date: Fri, 8 Nov 2019 09:59:42 -0500 Subject: [PATCH] Added currency to Transaction refund method 1. Added $currency param to method 2. Added withCurrency to the builder --- src/Entities/Transaction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Entities/Transaction.php b/src/Entities/Transaction.php index ffae75b6..45221dfc 100644 --- a/src/Entities/Transaction.php +++ b/src/Entities/Transaction.php @@ -319,13 +319,15 @@ public function hold() * Refunds/returns the original transaction. * * @param string|float $amount The amount to refund/return + * @param string $currency The currency type for this refund/return * * @return ManagementBuilder */ - public function refund($amount = null) + public function refund($amount = null, $currency = null) { return (new ManagementBuilder(TransactionType::REFUND)) ->withPaymentMethod($this->transactionReference) + ->withCurrency($currency) ->withAmount($amount); }