mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 08:14:44 -04: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->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//finalize payments on invoices here.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event['action'] === 'failed') {
|
if ($event['action'] === 'failed') {
|
||||||
// Update invoices, etc?
|
|
||||||
|
|
||||||
$payment = Payment::query()
|
$payment = Payment::query()
|
||||||
->where('transaction_reference', $event['links']['payment'])
|
->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…
x
Reference in New Issue
Block a user