altapay/api-php

AltaPay:支付更简单

3.4.2 2024-08-08 06:15 UTC

README

通过API访问AltaPay支付网关

安装

composer require altapay/api-php

使用

执行捕获操作时,可以使用以下内容

$auth = new \Altapay\Authentication('username', 'password' , 'myshop.gateway.com');
$api = new \Altapay\Api\Payments\CaptureReservation($auth);
$api->setTransactionId('transaction id');
// Or you can use a transaction object you got from a previous API call
// $api->setTransaction($transactionObject);
try {
    $response = $api->call();
    // If everything went perfect, you will get a \Altapay\Api\Document\Capture in the response
} catch (\Altapay\Api\Exceptions\ClientException $e) {
    // If anything went wrong, you will get a exception where you can see the raw request and the raw response
}

要求

AltaPay API PHP要求PHP 5.6.0或更高版本,并安装以下扩展

  • date
  • filter
  • mbstring
  • pcre
  • Reflection
  • SimpleXML
  • spl

变更日志

查看变更日志以获取所有发布说明。

许可

在MIT许可下分发。更多信息请参阅LICENSE

文档

更多信息请参阅文档