Remove redirect redirect

This commit is contained in:
Benjamin Beganović 2021-01-13 13:41:04 +01:00
parent 9516f877f6
commit 9975691ef4

View File

@ -121,23 +121,11 @@ class CheckoutComPaymentDriver extends BaseDriver
public function authorizeView($data) public function authorizeView($data)
{ {
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
return $this->payment_method->authorizeView($data); return $this->payment_method->authorizeView($data);
} }
public function authorizeResponse($data) public function authorizeResponse($data)
{ {
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
return $this->payment_method->authorizeResponse($data); return $this->payment_method->authorizeResponse($data);
} }
@ -149,12 +137,6 @@ class CheckoutComPaymentDriver extends BaseDriver
*/ */
public function processPaymentView(array $data) public function processPaymentView(array $data)
{ {
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
return $this->payment_method->paymentView($data); return $this->payment_method->paymentView($data);
} }
@ -166,12 +148,6 @@ class CheckoutComPaymentDriver extends BaseDriver
*/ */
public function processPaymentResponse($request) public function processPaymentResponse($request)
{ {
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
return $this->payment_method->paymentResponse($request); return $this->payment_method->paymentResponse($request);
} }