2017 © Pedro Peláez
 

library allinpay

This is a allinpay

image

bqdove/allinpay

This is a allinpay

  • Thursday, March 22, 2018
  • by bqdove
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

AllinPay 通联支付说明

请先熟悉 通联支付 开发文档!, (*1)

QuickReference

支付

   use Bqdove\AllinPay\AllinPay;

   // 配置
   $config = [
        'payUrl' => 'http://ceshi.allinpay.com/gateway/index.do',
        'pickupUrl' => "http://www.test.com/return_callback",
        'receiveUrl' => "http://www.test.com/notify",
        'merchantId' => '100020091218001',
        'key' => '1234567890'
   ];

    // 订单
    $order = [
        'orderNo' => '0001201213',
        'orderAmount' => 100,
        'orderDatetime' => date('YmdHis', time()), // 订单提交时间
        'productName' => "测试的商品"
    ];

    // 支付 呼起通联收银台
    $allinpay = new AllinPay($config);
    echo $allinpay->pay($order);



查询

    use Bqdove\AllinPay\AllinPay;

    $config = [
        'payUrl' => 'http://ceshi.allinpay.com/gateway/index.do',
        'pickupUrl' => "http://www.test.com/return_callback",
        'receiveUrl' => "http://www.test.com/notify",
        'merchantId' => '100020091218001',
        'key' => '1234567890'
    ];

    $order = [
        "orderNo" => "0001201212",
        "orderDatetime" => "20180322083745"
    ];

    $allinpay = new AllinPay($config);
    try {
        $result = $allinpay->find($order);
        echo "<pre>";
        var_dump($result);
    } catch (Exception $e) {
        echo $e->getMessage();
    }

    返回结果:
    Ibeach\Supports\Collection Object
    (
        [items:protected] => Array
            (
                [credentialsType] => 
                [payAmount] => 100
                [extTL] => 
                [payDatetime] => 20180322163633
                [signType] => 0
                [returnDatetime] => 20180322171210
                [credentialsNo] => 
                [paymentOrderId] => 201803221632204938
                [pan] => 
                [version] => v1.0
                [issuerId] => 
                [orderNo] => 0001201212
                [payResult] => 1
                [ext1] => 
                [ext2] => 
                [orderAmount] => 100
                [signMsg] => F8D2E1E4278FAFCCAEC35F71E4F15B2A
                [txOrgId] => 
                [errorCode] => 
                [userName] => 
                [payType] => 0
                [merchantId] => 100020091218001
                [language] => 1
                [orderDatetime] => 20180322083745
            )

    )

订单查询,返回 Collection 类型,可以通过 $collection->xxx 得到服务器返回的数据。, (*2)

退款

    use Bqdove\AllinPay\AllinPay;

    $config = [
        'payUrl' => 'http://ceshi.allinpay.com/gateway/index.do',
        'pickupUrl' => "http://www.test.com/return_callback",
        'receiveUrl' => "http://www.test.com/notify",
        'merchantId' => '100020091218001',
        'key' => '1234567890'
    ];

    $order = [
        'orderNo' => '0001201212',                            // 商户订单号
        'refundAmount' => 100, // 退款金额
        'orderDatetime' => '20180322083745',              // 订单创建时间
    ];


    $allinpay = new AllinPay($config);
    try{
        $result = $allinpay->refund($order);
        echo "<pre>";
        print_r($result);
    }catch (Exception $exception) {

    }

    返回结果:
    Ibeach\Supports\Collection Object
    (
        [items:protected] => Array
            (
                [merchantId] => 100020091218001
                [version] => v1.3
                [signType] => 0
                [orderNo] => 0001201212
                [orderAmount] => 10000
                [orderDatetime] => 20180322083745
                [refundAmount] => 10000
                [refundDatetime] => 20180322171848
                [refundResult] => 20
                [returnDatetime] => 20180322170944
                [signMsg] => 6B88885BAB3306DB1EBC889C2C5D4883
            )

    )
    返回 Collection 类型,可以通过 `$collection->xxx` 得到服务器返回的数据。

The Versions

22/03 2018

dev-master

9999999-dev

This is a allinpay

  Sources   Download

MIT

The Requires

 

by HouJie

支付 allinpay 通联支付

22/03 2018

v1.0

1.0.0.0

This is a allinpay

  Sources   Download

MIT

The Requires

 

by HouJie

支付 allinpay 通联支付