From eb1355cbd795158d3397311cb2e188bf08e05148 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Nov 2022 13:38:12 +1100 Subject: [PATCH] Working on gocardless instant bank payment notifications --- app/PaymentDrivers/GoCardlessPaymentDriver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/PaymentDrivers/GoCardlessPaymentDriver.php b/app/PaymentDrivers/GoCardlessPaymentDriver.php index fb7c516aadd0..9ca6bc940c87 100644 --- a/app/PaymentDrivers/GoCardlessPaymentDriver.php +++ b/app/PaymentDrivers/GoCardlessPaymentDriver.php @@ -278,6 +278,9 @@ class GoCardlessPaymentDriver extends BaseDriver //PaymentHash::whereJsonContains('data->billing_request', 'BRQ0001BQ8JESEV')->first(); //i need to build more context here, i need the client , the payment hash resolved and update the class properties. + //after i resolve the payment hash, ensure the invoice has not been marked as paid and the payment does not already exist. + //if it does exist, ensure it is completed and not pending. + // if($event['action'] == 'fulfilled' && array_key_exists('billing_request', $event['links'])) { // $billing_request = $this->go_cardless->gateway->billingRequests()->get(