From b91c92e99d6bb5523247850aa6e784c7784d44c7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 10 May 2022 09:20:25 +1000 Subject: [PATCH] Fixes for paypal express gateway fees --- .../PayPalExpressPaymentDriver.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/PaymentDrivers/PayPalExpressPaymentDriver.php b/app/PaymentDrivers/PayPalExpressPaymentDriver.php index afe824304a37..940f1617ea21 100644 --- a/app/PaymentDrivers/PayPalExpressPaymentDriver.php +++ b/app/PaymentDrivers/PayPalExpressPaymentDriver.php @@ -185,7 +185,8 @@ class PayPalExpressPaymentDriver extends BaseDriver 'currency' => $this->client->getCurrencyCode(), 'transactionType' => 'Purchase', 'clientIp' => request()->getClientIp(), - 'amount' => round(($data['total']['amount_with_fee'] + $this->fee),2), + // 'amount' => round(($data['total']['amount_with_fee'] + $this->fee),2), + 'amount' => round($data['total']['amount_with_fee'],2), 'returnUrl' => route('client.payments.response', [ 'company_gateway_id' => $this->company_gateway->id, 'payment_hash' => $this->payment_hash->hash, @@ -218,17 +219,16 @@ class PayPalExpressPaymentDriver extends BaseDriver ]); - if($this->fee > 0.1){ + // if($this->fee > 0.1){ - $items[] = new Item([ - 'name' => " ", - 'description' => ctrans('texts.gateway_fee_description'), - 'price' => $this->fee, - 'quantity' => 1, - ]); + // $items[] = new Item([ + // 'name' => " ", + // 'description' => ctrans('texts.gateway_fee_description'), + // 'price' => $this->fee, + // 'quantity' => 1, + // ]); - - } + // } return $items;