diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index e5cbc4b895c4..70c2f009730a 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -617,7 +617,7 @@ class StripePaymentDriver extends BaseDriver 'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency()), ], $meta); - if ($response->status == $response::STATUS_SUCCEEDED) { + if (in_array($response->status, [$response::STATUS_SUCCEEDED, 'pending'])) { SystemLogger::dispatch(['server_response' => $response, 'data' => request()->all()], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->client, $this->client->company); return [ @@ -712,6 +712,11 @@ class StripePaymentDriver extends BaseDriver } if ($payment) { + + if(isset($transaction['payment_method_details']['au_becs_debit'])) { + $payment->transaction_reference = $transaction['id']; + } + $payment->status_id = Payment::STATUS_COMPLETED; $payment->save(); } diff --git a/app/Utils/Traits/CleanLineItems.php b/app/Utils/Traits/CleanLineItems.php index 19938c0dce0b..8c6a79b85478 100644 --- a/app/Utils/Traits/CleanLineItems.php +++ b/app/Utils/Traits/CleanLineItems.php @@ -76,7 +76,7 @@ trait CleanLineItems } - if (array_key_exists('id', $item)) { + if (array_key_exists('id', $item) || array_key_exists('_id', $item)) { unset($item['id']); }