1. Go to this page and download the library: Download moffhub/mps-spec 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/ */
moffhub / mps-spec example snippets
use Moffhub\MpsSpec\Contracts\ConnectorInterface;
use Moffhub\MpsSpec\Contracts\HasChargeCapability;
use Moffhub\MpsSpec\Contracts\HasRefundCapability;
use Moffhub\MpsSpec\Data\ChargeRequest;
use Moffhub\MpsSpec\Data\ChargeResponse;
use Moffhub\MpsSpec\Data\ConnectorManifest;
use Moffhub\MpsSpec\Data\HealthStatus;
use Moffhub\MpsSpec\Data\RefundResponse;
use Moffhub\MpsSpec\Enums\Capability;
use Moffhub\MpsSpec\Enums\Channel;
use Moffhub\MpsSpec\Enums\SettlementModel;
final class AcmeConnector implements ConnectorInterface, HasChargeCapability, HasRefundCapability
{
public function manifest(): ConnectorManifest
{
return new ConnectorManifest(
connectorId: 'acme',
displayName: 'Acme Payments',
version: '1.0.0',
specVersion: '0.1',
vendorName: 'Acme Inc.',
vendorWebsite: 'https://acme.example',
vendorSupportEmail: '[email protected]',
supportedChannels: [Channel::Card],
supportedCurrencies: ['USD'],
capabilities: [Capability::Payment, Capability::Refund],
settlementModel: SettlementModel::T1,
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.