1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Fixes for gocardless

This commit is contained in:
David Bomba 2022-03-19 21:33:53 +11:00
parent 4483e883e6
commit c97f6a6247
2 changed files with 4 additions and 30 deletions

View File

@ -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'])

View File

@ -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();
}
* */
}