mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Cleaner error handling for gateway errors
This commit is contained in:
parent
0017307e39
commit
43b2bef464
@ -86,9 +86,16 @@ class ProcessPayment extends Component
|
|||||||
|
|
||||||
public function exception($e, $stopPropagation)
|
public function exception($e, $stopPropagation)
|
||||||
{
|
{
|
||||||
|
|
||||||
nlog($e->getMessage());
|
$errors = session()->get('errors', new \Illuminate\Support\ViewErrorBag());
|
||||||
|
|
||||||
|
$bag = new \Illuminate\Support\MessageBag();
|
||||||
|
$bag->add('gateway_error', $e->getMessage());
|
||||||
|
|
||||||
|
session()->put('errors', $errors->put('default', $bag));
|
||||||
|
|
||||||
|
$invoice_id = $this->getContext()['payable_invoices'][0]['invoice_id'];
|
||||||
|
$this->redirectRoute('client.invoice.show', ['invoice' => $invoice_id]);
|
||||||
$stopPropagation();
|
$stopPropagation();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user