gandhist/irisla

连接 Laravel 到 iris 支付网关的包

dev-master 2021-02-02 07:40 UTC

This package is auto-updated.

Last update: 2024-09-29 06:02:21 UTC


README

这个库用于使用 iris midtrans 通过 Laravel 进行支付

需求

  • laravel 最低版本 5.7
  • PHP 版本 7.2
  • 环境变量 = IRIS_END_POINT=https://app.sandbox.midtrans.com/iris/api/v1/
  • 环境变量 = IRIS_API_KEY_CREATOR={YOUR-IRIS-API-CREATOR}
  • 环境变量 = IRIS_API_KEY_APPROVER={YOUR-IRIS-API-APPROVER}

如何使用

  • 安装 composer require gandhist/irisla

  • 导入库

    • use Gandhist\Irisla\Beneficiaries;
    • use Gandhist\Irisla\Payouts;
    • use Gandhist\Irisla\Transactions;
  • 创建新实例 $my_balance = new Transactions->balance_aggregator();

当前功能

所有方法都需要从官方 iris api 获取 url 终端点和 body,参考:IRIS 文档

受益人

  • get(null)
  • post($body)
  • patch($alias_name, $body)

支付

  • create($body)
  • approve($body)
  • reject($body)
  • details($reference_no)

交易

  • history($body) // from_date, to_date
  • top_up_channel()
  • balance_aggregator()
  • bank_accounts()
  • balance_facilitator()