From e002a786aae20efb1e311ab77687cf086d4d0343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 5 Dec 2023 21:38:23 +0000 Subject: [PATCH] Fix typos --- src/StripeDriver.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/StripeDriver.php b/src/StripeDriver.php index 6a2ac8c..15138f8 100644 --- a/src/StripeDriver.php +++ b/src/StripeDriver.php @@ -22,7 +22,7 @@ class StripeDriver extends Driver public readonly StripeClient $client; /** - * The payment redirect URL resovler callback. + * The payment redirect URL resolver callback. */ protected static ?Closure $redirectUrlAfterPayment = null; @@ -47,13 +47,13 @@ public static function redirectUrlAfterPayment(Closure $callback): void /** * Resolve the redirect URL after payment. */ - public function resolveRedirectUrlAfterPayment(Order $order, string $staus, Transaction $transaction = null): string + public function resolveRedirectUrlAfterPayment(Order $order, string $status, Transaction $transaction = null): string { if (! is_null(static::$redirectUrlAfterPayment)) { - return call_user_func_array(static::$redirectUrlAfterPayment, [$order, $staus, $transaction]); + return call_user_func_array(static::$redirectUrlAfterPayment, [$order, $status, $transaction]); } - return match ($staus) { + return match ($status) { 'success' => $this->config['success_url'] ?? '/', default => $this->config['cancel_url'] ?? '/', }; @@ -62,17 +62,17 @@ public function resolveRedirectUrlAfterPayment(Order $order, string $staus, Tran /** * {@inheritdoc} */ - public function pay(Order $order, float $amount = null, array $attrributes = []): Transaction + public function pay(Order $order, float $amount = null, array $attributes = []): Transaction { - return $order->pay($amount, 'stripe', $attrributes); + return $order->pay($amount, 'stripe', $attributes); } /** * {@inheritdoc} */ - public function refund(Order $order, float $amount = null, array $attrributes = []): Transaction + public function refund(Order $order, float $amount = null, array $attributes = []): Transaction { - return $order->refund($amount, 'stripe', $attrributes); + return $order->refund($amount, 'stripe', $attributes); } /**