Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/REST/Order_Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Order_Endpoint extends Abstract_REST_Endpoint {
*
* @var string
*/
protected $path = '/commerce/paystack/order';
protected string $path = '/commerce/paystack/order';

/**
* Register the actual endpoint on WP Rest API.
Expand Down
8 changes: 4 additions & 4 deletions classes/class-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ class Gateway extends Abstract_Gateway {
/**
* @inheritDoc
*/
protected static $key = 'paystack';
protected static string $key = 'paystack';

/**
* @inheritDoc
*/
protected static $settings = Settings::class;
protected static string $settings = Settings::class;

/**
* @inheritDoc
*/
protected static $merchant = Merchant::class;
protected static string $merchant = Merchant::class;

/**
* @inheritDoc
*/
protected static $supported_currencies = array( 'NGN', 'GHS', 'USD', 'KES', 'ZAR', 'XOF', 'EGP' );
protected static array $supported_currencies = array( 'NGN', 'GHS', 'USD', 'KES', 'ZAR', 'XOF', 'EGP' );

/**
* @inheritDoc
Expand Down
42 changes: 42 additions & 0 deletions classes/class-merchant.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,46 @@ public function get_locale() {
*/
return apply_filters( 'tec_tickets_commerce_gateway_paystack_merchant_locale', $locale );
}

/**
* Gets the client secret for merchant.
*
* @since 5.24.0
*
* @return ?string
*/
public function get_client_secret(): ?string {
// Paystack doesn't use client secrets in the same way as other payment gateways
return null;
}

/**
* Gets the disconnect action for merchant.
*
* @since 5.11.0.5
*
* @return string
*/
public function get_disconnect_action(): string {
return 'tec_tickets_commerce_paystack_disconnect';
}

/**
* Gets the disconnect url for merchant.
*
* @since 5.11.0.5
*
* @return string
*/
public function get_disconnect_url(): string {
return wp_nonce_url(
add_query_arg(
[
'action' => $this->get_disconnect_action(),
],
admin_url( 'admin-ajax.php' )
),
$this->get_disconnect_action()
);
}
}