Skip to content

Commit

Permalink
Rename some more
Browse files Browse the repository at this point in the history
  • Loading branch information
r-kujawa committed Apr 20, 2024
1 parent 9b6bef4 commit c156ef8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Payavel\Checkout\CheckoutGateway;

trait ConfiguresPaymentGateway
trait ConfiguresCheckoutGateway
{
/**
* The payment method's pre-configured gateway.
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Traits/PaymentMethodRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

trait PaymentMethodRequests
{
use ConfiguresPaymentGateway;
use ConfiguresCheckoutGateway;

/**
* Fetch the payment method details from the provider.
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Traits/PaymentTransactionRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

trait PaymentTransactionRequests
{
use ConfiguresPaymentGateway;
use ConfiguresCheckoutGateway;

/**
* Fetch the transaction details from the provider.
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Traits/WalletRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

trait WalletRequests
{
use ConfiguresPaymentGateway;
use ConfiguresCheckoutGateway;

/**
* Fetch the wallet details from the provider.
Expand Down
26 changes: 13 additions & 13 deletions tests/Unit/TestCheckoutGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()
{
Expand Down

0 comments on commit c156ef8

Please sign in to comment.