From c59b7e01875b913dfbfa0c43f0680f27ce18e775 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 17 May 2022 07:30:41 +1000 Subject: [PATCH] Listen for additional webhooks for gocardless --- app/PaymentDrivers/GoCardlessPaymentDriver.php | 2 +- app/PaymentDrivers/StripePaymentDriver.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/GoCardlessPaymentDriver.php b/app/PaymentDrivers/GoCardlessPaymentDriver.php index 6a774fe1999d..e46d419c9fca 100644 --- a/app/PaymentDrivers/GoCardlessPaymentDriver.php +++ b/app/PaymentDrivers/GoCardlessPaymentDriver.php @@ -245,7 +245,7 @@ class GoCardlessPaymentDriver extends BaseDriver sleep(1); foreach ($request->events as $event) { - if ($event['action'] === 'confirmed') { + if ($event['action'] === 'confirmed' || $event['action'] === 'paid_out') { nlog("Searching for transaction reference"); diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index c71f81655bc7..cf47f1bd8e0b 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -579,7 +579,7 @@ class StripePaymentDriver extends BaseDriver if(array_key_exists('payment_intent', $transaction)) { $payment = Payment::query() - ->where('company_id', $request->getCompany()->id) + // ->where('company_id', $request->getCompany()->id) ->where(function ($query) use ($transaction) { $query->where('transaction_reference', $transaction['payment_intent']) ->orWhere('transaction_reference', $transaction['id']); @@ -589,7 +589,7 @@ class StripePaymentDriver extends BaseDriver else { $payment = Payment::query() - ->where('company_id', $request->getCompany()->id) + // ->where('company_id', $request->getCompany()->id) ->where('transaction_reference', $transaction['id']) ->first(); }