1. Go to this page and download the library: Download koh/sylius-mpp 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 Koh\SyliusAgentContracts\Context\AgentContext;
use Koh\SyliusAgentContracts\Model\PayableOperation;
use Koh\SyliusAgentContracts\Provider\PayableOperationProviderInterface;
final class FeedPrice implements PayableOperationProviderInterface
{
public function getPayableOperations(AgentContext $context): iterable
{
yield new PayableOperation(
path: '/api/agent/feed',
method: 'GET',
intent: 'charge',
payMethod: 'tempo',
amount: '10000', // smallest unit of the currency
currency: '0x…', // ISO 4217 for fiat, token address for a token
description: 'Product feed',
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.