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:
parent
4483e883e6
commit
c97f6a6247
@ -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'])
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
* */
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user