From e617c7aade9026adf88042cb7a20bf81051de551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 10 Aug 2021 10:13:04 +0200 Subject: [PATCH] Add `next` to ACH verification url --- app/PaymentDrivers/Stripe/ACH.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Stripe/ACH.php b/app/PaymentDrivers/Stripe/ACH.php index 703402a34411..a17725225b08 100644 --- a/app/PaymentDrivers/Stripe/ACH.php +++ b/app/PaymentDrivers/Stripe/ACH.php @@ -68,8 +68,15 @@ class ACH $client_gateway_token = $this->storePaymentMethod($source, $request->input('method'), $customer); + $verification = route('client.payment_methods.verification', ['payment_method' => $client_gateway_token->hashed_id, 'method' => GatewayType::BANK_TRANSFER], false); + $mailer = new NinjaMailerObject(); - $mailer->mailable = new ACHVerificationNotification(auth('contact')->user()->client->company, route('client.payment_methods.verification', ['payment_method' => $client_gateway_token->hashed_id, 'method' => GatewayType::BANK_TRANSFER])); + + $mailer->mailable = new ACHVerificationNotification( + auth('contact')->user()->client->company, + route('client.contact_login', ['contact_key' => auth('contact')->user()->contact_key, 'next' => $verification]) + ); + $mailer->company = auth('contact')->user()->client->company; $mailer->settings = auth('contact')->user()->client->company->settings; $mailer->to_user = auth('contact')->user();