mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for exception handling
This commit is contained in:
parent
6238d45bbd
commit
da60a49e88
@ -568,6 +568,7 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
$error = array_key_exists('error', $response) ? $response['error'] : 'Undefined Error';
|
$error = array_key_exists('error', $response) ? $response['error'] : 'Undefined Error';
|
||||||
$error_code = array_key_exists('error_code', $response) ? $response['error_code'] : 'Undefined Error Code';
|
$error_code = array_key_exists('error_code', $response) ? $response['error_code'] : 'Undefined Error Code';
|
||||||
|
|
||||||
|
if($this->payment_hash)
|
||||||
$this->unWindGatewayFees($this->payment_hash);
|
$this->unWindGatewayFees($this->payment_hash);
|
||||||
|
|
||||||
$this->sendFailureMail($error);
|
$this->sendFailureMail($error);
|
||||||
@ -579,10 +580,6 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
|
|
||||||
$invoices = Invoice::query()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->withTrashed()->get();
|
$invoices = Invoice::query()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->withTrashed()->get();
|
||||||
|
|
||||||
// $invoices->each(function ($invoice) {
|
|
||||||
// $invoice->service()->deletePdf();
|
|
||||||
// });
|
|
||||||
|
|
||||||
$invoices->first()->invitations->each(function ($invitation) use ($nmo) {
|
$invoices->first()->invitations->each(function ($invitation) use ($nmo) {
|
||||||
if (! $invitation->contact->trashed()) {
|
if (! $invitation->contact->trashed()) {
|
||||||
$nmo->to_user = $invitation->contact;
|
$nmo->to_user = $invitation->contact;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user