self::aliConfig()//支付宝 配置 在上篇文章
/**
* 支付宝授权解冻
* @param $auth_no 支付宝资金授权订单号
* @param $out_request_no 商户资金操作的流水号
* @param $amount 解冻金额
* @return bool|mixed|SimpleXMLElement
* @throws Exception
*/
public function capitalThaw($auth_no,$out_request_no,$amount){
//调用配置、和方法
$aop = self::aliConfig();
$request = new AlipayFundAuthOrderUnfreezeRequest ();
//组装数据发送资金冻结请求
$request->setBizContent(
json_encode([
'auth_no' => $auth_no, //支付宝资金授权订单号
'out_request_no' => $out_request_no, //商户资金操作的流水号
'amount' => $amount, //本次操作解冻的金额
'remark' => date('Y-m-d')."期解冻".$amount."元" //商户对本次解冻操作的附言描述
])
);
$request->setNotifyUrl('url');//请求成功回调地址
$result = $aop->execute ($request);
return $result;
}
请求成功示例:
{
"alipay_fund_auth_order_unfreeze_response": {
"code": "10000",
"msg": "Success",
"auth_no": "201407080000200***0000014417",
"out_order_no": "4977164666634053",
"operation_id": "20140708000***50551",
"out_request_no": "20140707001555633",
"amount": 0.01,
"status": "SUCCESS",
"gmt_trans": "2014-09-15 11:23:04"
},
"sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
}