TP支付宝线上资金冻结撤消

public function cancelFreeze($config, $order){
$sysconfig = Db::name("setting")->find();
vendor('alipays.AopSdk');
$aop = new \AopClient ();
$aop->appId = $config['appId'];
$aop->rsaPrivateKey = $config['appSecret'];
$aop->alipayrsaPublicKey = $config['aliSecret'];
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
$aop->apiVersion = '1.0';
$aop->signType = 'RSA2';
$aop->postCharset='utf-8';
$aop->format='json';
$request = new \AlipayFundAuthOperationCancelRequest();
$request->setBizContent("{" .
"\"auth_no\":\"".$order['authno']."\"," .
"\"out_order_no\":\"".$order['ordersn']."\"," .
"\"operation_id\":\"".$order['operation_id']."\"," .
"\"out_request_no\":\"".$order['ordersn']."\"," .
"\"remark\":\"授权撤销\"" .
"}");
$result = $aop->execute($request);
var_dump($result) ;
}
posted @ 2020-05-12 18:01  鲨鱼大王  阅读(231)  评论(0编辑  收藏  举报