diff --git a/app/PaymentDrivers/GoCardlessPaymentDriver.php b/app/PaymentDrivers/GoCardlessPaymentDriver.php index 181998e0367e..c9cdaef99e98 100644 --- a/app/PaymentDrivers/GoCardlessPaymentDriver.php +++ b/app/PaymentDrivers/GoCardlessPaymentDriver.php @@ -253,10 +253,13 @@ class GoCardlessPaymentDriver extends BaseDriver $payment->status_id = Payment::STATUS_COMPLETED; $payment->save(); } + + + //finalize payments on invoices here. + } if ($event['action'] === 'failed') { - // Update invoices, etc? $payment = Payment::query() ->where('transaction_reference', $event['links']['payment']) diff --git a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php index 8ca8ebe1989a..ecf8bf9161e1 100644 --- a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php +++ b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php @@ -170,33 +170,4 @@ class PaymentIntentWebhook implements ShouldQueue } - //charge # optional($this->stripe_request['object']['charges']['data'][0])['id'] - //metadata # optional($this->stripe_request['object']['charges']['data'][0]['metadata']['gateway_type_id'] - //metadata # optional($this->stripe_request['object']['charges']['data'][0]['metadata']['payment_hash'] - - -/** - * - * $intent = \Stripe\PaymentIntent::retrieve('{{PAYMENT_INTENT_ID}}'); - $charges = $intent->charges->data; - * - * - * $payment = Payment::query() - ->where('company_id', $request->getCompany()->id) - ->where('transaction_reference', $transaction['id']) - ->first(); - - - if ($payment) { - $payment->status_id = Payment::STATUS_COMPLETED; - $payment->save(); - } - - - - - * */ - - - } \ No newline at end of file