mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
add pending as valid refund state for Stripe
This commit is contained in:
parent
a7ad937e84
commit
55f72ba450
@ -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();
|
||||
}
|
||||
|
@ -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']);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user