From 35fd12419088433e55acdbde14838640d439951d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 2 May 2024 14:27:37 +1000 Subject: [PATCH] Paypal Advanced card payments --- app/PaymentDrivers/PayPalRestPaymentDriver.php | 6 +++--- app/Services/ClientPortal/InstantPayment.php | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/PaymentDrivers/PayPalRestPaymentDriver.php b/app/PaymentDrivers/PayPalRestPaymentDriver.php index 35fa3a902d6d..e22706024668 100644 --- a/app/PaymentDrivers/PayPalRestPaymentDriver.php +++ b/app/PaymentDrivers/PayPalRestPaymentDriver.php @@ -170,9 +170,9 @@ class PayPalRestPaymentDriver extends BaseDriver $data['currency'] = $this->client->currency()->code; -return render('gateways.paypal.ppcp.card', $data); +// return render('gateways.paypal.ppcp.card', $data); -// return render('gateways.paypal.pay', $data); +return render('gateways.paypal.pay', $data); } @@ -400,7 +400,7 @@ return render('gateways.paypal.ppcp.card', $data); $data['token'] = $token; $data['payment_method_id'] = GatewayType::PAYPAL_ADVANCED_CARDS; $data['payment_meta'] = $payment_meta; - $data['payment_method_id'] = GatewayType::CREDIT_CARD; + // $data['payment_method_id'] = GatewayType::CREDIT_CARD; $additional['gateway_customer_reference'] = $gateway_customer_reference; diff --git a/app/Services/ClientPortal/InstantPayment.php b/app/Services/ClientPortal/InstantPayment.php index 7bd29f8f3bc5..3bbb8489e42b 100644 --- a/app/Services/ClientPortal/InstantPayment.php +++ b/app/Services/ClientPortal/InstantPayment.php @@ -208,11 +208,6 @@ class InstantPayment $credit_totals = in_array($first_invoice->client->getSetting('use_credits_payment'), ['always', 'option']) ? $first_invoice->client->service()->getCreditBalance() : 0; $starting_invoice_amount = $first_invoice->balance; - /* Schedule a job to check the gateway fees for this invoice*/ - // if (Ninja::isHosted()) { - // CheckGatewayFee::dispatch($first_invoice->id, $client->company->db)->delay(800); - // } - if ($gateway) { $first_invoice->service()->addGatewayFee($gateway, $payment_method_id, $invoice_totals)->save(); }