1. Go to this page and download the library: Download rublex/laravel-core-gateway library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Rublex\CoreGateway\Contracts\Common\GatewayInterface;
use Rublex\CoreGateway\Contracts\Payment\InitiatesPaymentInterface;
use Rublex\CoreGateway\Data\PaymentInitResultData;
use Rublex\CoreGateway\Data\PaymentRequestData;
use Rublex\CoreGateway\Enums\GatewayType;
use Rublex\CoreGateway\Enums\PaymentStatus;
final class ExampleGateway implements GatewayInterface, InitiatesPaymentInterface
{
public function code(): string
{
return 'example';
}
public function type(): GatewayType
{
return GatewayType::FIAT;
}
public function initiate(PaymentRequestData $request): PaymentInitResultData
{
// map provider response into the core result shape
return new PaymentInitResultData(PaymentStatus::PENDING);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.