From c156ef836159377f07eae556ed7f44cd3f51992d Mon Sep 17 00:00:00 2001 From: r-kujawa Date: Sat, 20 Apr 2024 05:49:36 -0600 Subject: [PATCH] Rename some more --- ...eway.php => ConfiguresCheckoutGateway.php} | 2 +- src/Models/Traits/PaymentMethodRequests.php | 2 +- .../Traits/PaymentTransactionRequests.php | 2 +- src/Models/Traits/WalletRequests.php | 2 +- tests/Unit/TestCheckoutGateway.php | 26 +++++++++---------- 5 files changed, 17 insertions(+), 17 deletions(-) rename src/Models/Traits/{ConfiguresPaymentGateway.php => ConfiguresCheckoutGateway.php} (95%) diff --git a/src/Models/Traits/ConfiguresPaymentGateway.php b/src/Models/Traits/ConfiguresCheckoutGateway.php similarity index 95% rename from src/Models/Traits/ConfiguresPaymentGateway.php rename to src/Models/Traits/ConfiguresCheckoutGateway.php index 2e40fe4..6e186d5 100644 --- a/src/Models/Traits/ConfiguresPaymentGateway.php +++ b/src/Models/Traits/ConfiguresCheckoutGateway.php @@ -4,7 +4,7 @@ use Payavel\Checkout\CheckoutGateway; -trait ConfiguresPaymentGateway +trait ConfiguresCheckoutGateway { /** * The payment method's pre-configured gateway. diff --git a/src/Models/Traits/PaymentMethodRequests.php b/src/Models/Traits/PaymentMethodRequests.php index 827db46..886b1c6 100644 --- a/src/Models/Traits/PaymentMethodRequests.php +++ b/src/Models/Traits/PaymentMethodRequests.php @@ -4,7 +4,7 @@ trait PaymentMethodRequests { - use ConfiguresPaymentGateway; + use ConfiguresCheckoutGateway; /** * Fetch the payment method details from the provider. diff --git a/src/Models/Traits/PaymentTransactionRequests.php b/src/Models/Traits/PaymentTransactionRequests.php index bb97a2f..dd26993 100644 --- a/src/Models/Traits/PaymentTransactionRequests.php +++ b/src/Models/Traits/PaymentTransactionRequests.php @@ -4,7 +4,7 @@ trait PaymentTransactionRequests { - use ConfiguresPaymentGateway; + use ConfiguresCheckoutGateway; /** * Fetch the transaction details from the provider. diff --git a/src/Models/Traits/WalletRequests.php b/src/Models/Traits/WalletRequests.php index 04246f5..e8c2a97 100644 --- a/src/Models/Traits/WalletRequests.php +++ b/src/Models/Traits/WalletRequests.php @@ -4,7 +4,7 @@ trait WalletRequests { - use ConfiguresPaymentGateway; + use ConfiguresCheckoutGateway; /** * Fetch the wallet details from the provider. diff --git a/tests/Unit/TestCheckoutGateway.php b/tests/Unit/TestCheckoutGateway.php index 9a4e894..332fb9f 100644 --- a/tests/Unit/TestCheckoutGateway.php +++ b/tests/Unit/TestCheckoutGateway.php @@ -27,7 +27,7 @@ protected function setUp(): void parent::setUp(); $provider = $this->createProvider($this->checkoutService, [ - 'gateway' => TestPaymentRequest::class, + 'gateway' => TestCheckoutRequest::class, ]); $account = $this->createAccount($this->checkoutService); @@ -205,60 +205,60 @@ protected function assertResponseIsConfigured(CheckoutResponse $response) } } -class TestPaymentRequest extends CheckoutRequest +class TestCheckoutRequest extends CheckoutRequest { public function getWallet(Wallet $wallet) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function getPaymentMethod(PaymentMethod $paymentMethod) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function tokenizePaymentMethod(Billable $billable, $data) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function updatePaymentMethod(PaymentMethod $paymentMethod, $data) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function deletePaymentMethod(PaymentMethod $paymentMethod) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function authorize($data, Billable $billable = null) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function capture(PaymentTransaction $transaction, $data = []) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function getTransaction(PaymentTransaction $transaction) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function void(PaymentTransaction $paymentTransaction, $data = []) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } public function refund(PaymentTransaction $paymentTransaction, $data = []) { - return new TestPaymentResponse([]); + return new TestCheckoutResponse([]); } } -class TestPaymentResponse extends CheckoutResponse +class TestCheckoutResponse extends CheckoutResponse { public function getWalletResponse() {