mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-21 18:30:57 -04:00
Fixes for Stripe Webhook
This commit is contained in:
parent
555ad1e575
commit
b71c4965e2
@ -519,7 +519,12 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
->where('transaction_reference', $transaction['id'])
|
->where('transaction_reference', $transaction['id'])
|
||||||
->where('company_id', $request->getCompany()->id)
|
->where('company_id', $request->getCompany()->id)
|
||||||
->first();
|
->first();
|
||||||
|
if (empty($payment)){
|
||||||
|
$payment = Payment::query()
|
||||||
|
->where('transaction_reference', $transaction['payment_intent'])
|
||||||
|
->where('company_id', $request->getCompany()->id)
|
||||||
|
->first();
|
||||||
|
}
|
||||||
if ($payment) {
|
if ($payment) {
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
@ -540,7 +545,12 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
->where('transaction_reference', $transaction['id'])
|
->where('transaction_reference', $transaction['id'])
|
||||||
->where('company_id', $request->getCompany()->id)
|
->where('company_id', $request->getCompany()->id)
|
||||||
->first();
|
->first();
|
||||||
|
if (empty($payment)){
|
||||||
|
$payment = Payment::query()
|
||||||
|
->where('transaction_reference', $transaction['payment_intent'])
|
||||||
|
->where('company_id', $request->getCompany()->id)
|
||||||
|
->first();
|
||||||
|
}
|
||||||
if ($payment) {
|
if ($payment) {
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user