Implementing required interfaces
IConfigProvider
Stub implementation with comments:
use \Raylo\RayloPay\SDK\IConfigProvider;
use \Raylo\RayloPay\SDK\RayloPayEnvironment;
class ConfigProvider implements IConfigProvider {
private bool $isProduction;
private function __construct(bool $isProduction) {
$this->isProduction = $isProduction;
}
function merchantId() : string {
return '<constant, provided by Raylo>';
}
function jwtSigningKey() : string {
// treat this as a secret, i.e. fetch it from a secrets store, env var, etc.
return '<provided by Raylo>';
}
function rayloPayEnvironment() : RayloPayEnvironment {
// determines whether the SDK will connect to Raylo Pay prod or sandbox envs.
return $this->isProduction
? RayloPayEnvironment::production()
: RayloPayEnvironment::sandbox();
}
function raylopayServerBaseUrl() : string {
return ''; // not needed for RayloPay production or sandbox
}
function raylopayWidgetsBaseUrl() : string {
return ''; // not needed for RayloPay production or sandbox
}
}IMerchantUrlProvider
success: Checkout completed and approved by Raylo Pay
success: Checkout completed and approved by Raylo Payfailure: Checkout completed and declined by Raylo Pay
failure: Checkout completed and declined by Raylo Paynotify: Server-to-server communication
notify: Server-to-server communicationStub implementation with comments:
Handling notification call from Raylo Pay
Last updated
Was this helpful?