osag11/

kkiapay-php

适用于 kkiapay 支付网关的 Php SDK

dev-master 2021-05-02 08:02 UTC

This package is not auto-updated.

Last update: 2024-09-30 09:24:17 UTC


README

原始文件

    git clone https://github.com/osag11/php-sdk.git

安装

使用 composer

    composer require osag11/kkiapay-php

初始化

生产环境

    $kkiapay = new \Kkiapay\Kkiapay($public_key, $private_key, $secret);

沙盒

    $kkiapay = new \Kkiapay\Kkiapay($public_key, $private_key, $secret, $sandbox = true);

获取交易请求

示例

    $kkiapay->verifyTransaction($transaction_id);

撤销交易请求

示例

    $kkiapay->refundTransaction($transaction_id);

安排支付请求

示例

    
    // Example to schedule payout when amount reaches a ceiling
    $kkiapay->setupPayout(array( "algorithm" => "roof", "send_notification" => true, 
        "destination_type" => "MOBILE_MONEY", "roof_amount" => "1000", 
        "destination" => "22997000000" ));
        
        // Example to schedule payout by frequency
    $kkiapay->setupPayout(array( "algorithm" => "rate", "send_notification" => true, 
        "destination_type" => "MOBILE_MONEY", "rate_frequency" => "1m", 
        "destination" => "22997000000" ));

所有可能的完整状态列表