mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 22:24:42 +09:00
Stripe - refine invoice handling & status mapping (#3323)
This commit is contained in:
1 parent
8be6411154
commit
e77da2efc1
1 file changed
+3
-3
@@ -180,7 +180,7 @@ class Payment_Adapter_Stripe implements FOSSBilling\InjectionAwareInterface
|
||||
$invoiceService->approveInvoice($invoice, ['use_credits' => false]);
|
||||
}
|
||||
$invoiceService->payInvoiceWithCredits($invoice);
|
||||
} else {
|
||||
} elseif (!$tx->invoice_id) {
|
||||
$invoiceService->doBatchPayWithCredits(['client_id' => $client->id]);
|
||||
}
|
||||
}
|
||||
@@ -193,14 +193,14 @@ class Payment_Adapter_Stripe implements FOSSBilling\InjectionAwareInterface
|
||||
$paymentStatus = match ($charge->status) {
|
||||
'succeeded' => 'processed',
|
||||
'requires_action' => 'received',
|
||||
'requires_payment_method' => 'received',
|
||||
'requires_confirmation' => 'received',
|
||||
'requires_capture' => 'received',
|
||||
'processing' => 'received',
|
||||
'pending' => 'received',
|
||||
'requires_payment_method' => 'error',
|
||||
'canceled' => 'error',
|
||||
'failed' => 'error',
|
||||
default => 'received',
|
||||
default => 'error',
|
||||
};
|
||||
|
||||
$tx->status = $paymentStatus;
|
||||
|
||||
Reference in new issue
Block a user