1. Go to this page and download the library: Download mex3890/pim 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 App\CustomPayment\PaymentServices\PixService\Actions\CreateAction;
use App\CustomPayment\PaymentServices\PixService\Actions\DestroyAction;
use Pim\ServiceMap;
class PixServiceMap extends ServiceMap
{
public static function actionPrefix(): string
{
return 'pix';
}
public static function actions(): array
{
return [
CreateAction::ACTION_KEY,
DestroyAction::ACTION_KEY,
];
}
}
use App\CustomPayment\PaymentServices\PixService;
use App\CustomPayment\PaymentServices\PixService\PixServiceMap;
use Pim\DataTransferObjects\ConfigFile;
use Pim\PaymentProvider;
class CustomPaymentProvider extends PaymentProvider
{
public static function actionMaps(): array
{
return [
PixServiceMap::class,
];
}
}
use App\CustomPayment\PaymentServices\PixService;
use App\CustomPayment\PaymentServices\PixService\PixServiceMap;
use Pim\DataTransferObjects\ConfigFile;
use Pim\PaymentProvider;
class CustomPaymentProvider extends PaymentProvider
{
public static function paymentServices(): array
{
return [
PixService::class,
];
}
}