Commit 70cc485a authored by 夏彬's avatar 夏彬

添加企业付款接口

parent 2bbe42a0
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/1/8
* Time: 18:52
*/
use internalApi\ucenter\Transfer;
require __DIR__.'/_init.php';
Transfer::setDebug();
try{
$result = Transfer::create('12','kw','wx_lite',10,'123123123123123','http://u.yunya.com/test/tcallback');
}catch (\internalApi\base\ApiException $e){
echo 123123;
}
print_r($result);
\ No newline at end of file
`<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 2018/5/8
* Time: 10:53 AM
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class Transfer extends Client
{
/**
* 企业付款
* @param int $uid
* @param string $type 付款业务类型
* @param string $channel 付款渠道
* @param float $amount 付款金额,元为单位,支付小数点两位,最大 9999.99
* @param string $recipient 收款账号 支付宝账号或者使用微信企业付款到零钱时为用户在 wx 、 wx_pub 及 wx_lite 渠道下的 open_id
* @param string $callbackUrl 成功回调地址
* @param string $body 额外信息
* @param string $recipientName 收款姓名 微信相关渠道可以不传,传则进行校验
* @param string $description 描述 99 个英文和数字的组合或最多 33 个中文字符,不可以包含特殊字符;
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function create($uid, $type, $channel, $amount, $recipient, $callbackUrl, $body = '', $recipientName = '', $description = '')
{
return self::call('transfer.create', compact('uid', 'type', 'channel', 'amount', 'recipient', 'callbackUrl', 'body', 'recipientName', 'description'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment