mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
735bb7ea3b
@ -525,10 +525,13 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
foreach ($request->data as $transaction) {
|
foreach ($request->data as $transaction) {
|
||||||
$payment = Payment::query()
|
$payment = Payment::query()
|
||||||
->where('transaction_reference', $transaction['id'])
|
->where('transaction_reference', $transaction['payment_intent'])
|
||||||
->where('company_id', $request->getCompany()->id)
|
->where('company_id', $request->getCompany()->id)
|
||||||
|
->where(function ($query) use ($transaction) {
|
||||||
|
$query->where('transaction_reference', $transaction['payment_intent'])
|
||||||
|
->orWhere('transaction_reference', $transaction['id']);
|
||||||
|
})
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($payment) {
|
if ($payment) {
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
@ -546,10 +549,13 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
if ($charge->captured) {
|
if ($charge->captured) {
|
||||||
$payment = Payment::query()
|
$payment = Payment::query()
|
||||||
->where('transaction_reference', $transaction['id'])
|
->where('transaction_reference', $transaction['payment_intent'])
|
||||||
->where('company_id', $request->getCompany()->id)
|
->where('company_id', $request->getCompany()->id)
|
||||||
|
->where(function ($query) use ($transaction) {
|
||||||
|
$query->where('transaction_reference', $transaction['payment_intent'])
|
||||||
|
->orWhere('transaction_reference', $transaction['id']);
|
||||||
|
})
|
||||||
->first();
|
->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