eerison/whmcs-api

此包已被废弃且不再维护。未建议替代包。

Lib api externa whmcs

1.0.4 2017-05-18 20:24 UTC

This package is auto-updated.

Last update: 2021-10-01 15:40:08 UTC


README

Build Status SensioLabsInsight

用于使用 WHMCS 外部 API 的项目!

已实现的模块列表

  • 账单
    • 添加发票支付

composer

composer require eerison/whmcs-api

配置 app/config/config.yml

...
    whmcs:
      api:
        url : localhost
        username : whmcs
        password : whmcs    
...

示例

无环境变量示例

try {
    $payment = new \WhmcsApi\Invoice\AddInvoicePayment();
    $payment
        ->setInvoiceid(8542)
        ->setTransid('transação 1')
        ->setDate(\Carbon\Carbon::now())
        ->setGateway('banktransfer')
        ->exec()
    ;
} catch (WhmcsApi\Exception $e) {
    echo $e->getMessage();
}