From 9264b6b80ea880dbef16b8ec469cd61a792612bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 14 Oct 2021 18:44:07 +0200 Subject: [PATCH] Apply styles --- app/PaymentDrivers/CheckoutCom/CreditCard.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 1a6de72311ab..4859e2f1cb9f 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -27,7 +27,6 @@ use Checkout\Models\Payments\Payment; use Checkout\Models\Payments\TokenSource; use Illuminate\Contracts\View\Factory; use Illuminate\View\View; -use Omnipay\Common\Message\RedirectResponseInterface; class CreditCard implements MethodInterface { @@ -61,9 +60,9 @@ class CreditCard implements MethodInterface /** * Handle authorization for credit card. - * - * @param Request $request - * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse + * + * @param Request $request + * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ public function authorizeResponse(Request $request) { @@ -99,7 +98,7 @@ class CreditCard implements MethodInterface return redirect()->route('client.payment_methods.show', $payment_method->hashed_id); } - } catch(CheckoutHttpException $exception) { + } catch (CheckoutHttpException $exception) { throw new PaymentFailed( $exception->getMessage() ); @@ -172,7 +171,6 @@ class CreditCard implements MethodInterface private function completePayment($method, PaymentResponseRequest $request) { - $payment = new Payment($method, $this->checkout->payment_hash->data->currency); $payment->amount = $this->checkout->payment_hash->data->value; $payment->reference = $this->checkout->getDescription(); @@ -200,7 +198,6 @@ class CreditCard implements MethodInterface $response = $this->checkout->gateway->payments()->request($payment); if ($response->status == 'Authorized') { - return $this->processSuccessfulPayment($response); } @@ -220,7 +217,6 @@ class CreditCard implements MethodInterface return $this->processUnsuccessfulPayment($response); } } catch (CheckoutHttpException $e) { - $this->checkout->unWindGatewayFees($this->checkout->payment_hash); return $this->checkout->processInternallyFailedPayment($this->checkout, $e); }