maldopay/maldopay-php-sdk

1.1.1 2022-04-12 10:02 UTC

This package is auto-updated.

Last update: 2024-09-10 21:11:41 UTC


README

MaldoPay PHP SDK 是一个PHP库,简化了与每个 MaldoPay 服务器集成的过程。

要求

PHP 5.4.8 或更高版本。

安装

通过 composer 安装

composer require maldopay/maldopay-php-sdk

手动安装

从这里下载我们的最新版本 here。然后使用 Loader.php 文件

require_once './SDK/Loader.php';;

示例用法

require_once './SDK/Loader.php';

$authRequest = new \MaldoPay\SDK\AuthRequest(
    81433,
    15,
    "Ivan",
    "Ivanov",
    "127.0.0.1",
    1235,
    345435345322,
    "test@abv.bg",
    "Etropole",
    "1980-01-01",
    100,
    "Test"
);

$Autohrization = new \MaldoPay\SDK\Authorization($authRequest);

$cepBankService = new \MaldoPay\SDK\Services\Cepbank();
$cepBankService->setServiceData1("2104144157120047");
$cepBankService->setServiceData2("5");

$transactionRequest = new \MaldoPay\SDK\TransactionRequest(
    $Autohrization,
    $cepBankService,
    12980,
    'cep_bank_live_111511',
    50,
    "test",
    "test.bg",
    "test.bg",
    "test.bg",
    "test.bg"
);


$transaction = new \MaldoPay\SDK\Transaction($transactionRequest)->Create();

文档

更多文档可在 https://www.maldopay.com/documentation 查找。