mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
fixes for refundS
This commit is contained in:
parent
ea38fb2b37
commit
97c58bcf70
@ -72,6 +72,9 @@ class CompanyController extends BaseController
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->company_repo = $company_repo;
|
$this->company_repo = $company_repo;
|
||||||
|
|
||||||
|
// $this->middleware('password_protected')->only(['destroy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,8 +81,14 @@ class RefundPayment
|
|||||||
|
|
||||||
if ($response['success'] == false) {
|
if ($response['success'] == false) {
|
||||||
$this->payment->save();
|
$this->payment->save();
|
||||||
throw new PaymentRefundFailed($response['description']);
|
|
||||||
|
if(array_key_exists('description', $response))
|
||||||
|
throw new PaymentRefundFailed($response['description']);
|
||||||
|
else
|
||||||
|
throw new PaymentRefundFailed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->payment->refunded += $this->total_refund;
|
$this->payment->refunded += $this->total_refund;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user