mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for removing payment methods
This commit is contained in:
parent
f9b788ba50
commit
c224255621
@ -120,16 +120,23 @@ class PaymentMethodController extends Controller
|
||||
{
|
||||
// $gateway = $this->getClientGateway();
|
||||
|
||||
try {
|
||||
|
||||
$payment_method->gateway
|
||||
->driver(auth()->user()->client)
|
||||
->setPaymentMethod(request()->query('method'))
|
||||
->detach($payment_method);
|
||||
|
||||
try {
|
||||
event(new MethodDeleted($payment_method, auth('contact')->user()->company, Ninja::eventVars(auth('contact')->user()->id)));
|
||||
|
||||
$payment_method->delete();
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
event(new MethodDeleted($payment_method, auth('contact')->user()->company, Ninja::eventVars(auth('contact')->user()->id)));
|
||||
|
||||
$payment_method->delete();
|
||||
|
||||
nlog($e->getMessage());
|
||||
|
||||
return back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user