Fixes for paypal express gateway fees

This commit is contained in:
David Bomba 2022-05-10 09:20:25 +10:00
parent ccd8a77a69
commit b91c92e99d

View File

@ -185,7 +185,8 @@ class PayPalExpressPaymentDriver extends BaseDriver
'currency' => $this->client->getCurrencyCode(), 'currency' => $this->client->getCurrencyCode(),
'transactionType' => 'Purchase', 'transactionType' => 'Purchase',
'clientIp' => request()->getClientIp(), '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', [ 'returnUrl' => route('client.payments.response', [
'company_gateway_id' => $this->company_gateway->id, 'company_gateway_id' => $this->company_gateway->id,
'payment_hash' => $this->payment_hash->hash, '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([ // $items[] = new Item([
'name' => " ", // 'name' => " ",
'description' => ctrans('texts.gateway_fee_description'), // 'description' => ctrans('texts.gateway_fee_description'),
'price' => $this->fee, // 'price' => $this->fee,
'quantity' => 1, // 'quantity' => 1,
]); // ]);
// }
}
return $items; return $items;