编程语言
首页 > 编程语言> > php 微信退款

php 微信退款

作者:互联网


//要引入文件地址 https://gitee.com/zzl_index/wechat-refund.git

//微信退款
public function ref_money($id)
{
$param = $this->request->param();
//订单ID
if(!isset($param['id']) || empty($param['id'])){
return api_error('ID不能为空');
}

//业务操作

//调用退款
$appid = config('jwt.app_id');
$mchid = config('jwt.mchid');
$apiKey = config('jwt.key');
$reval = new Wxrefund($mchid,$appid,$apiKey);
$do_refund = $reval->chrefund($order_no,$price,$price);
if($do_refund == 1){
return 1;//成功
}else{
return 0;//失败
}
}

标签:refund,return,微信,jwt,param,config,php,退款,id
来源: https://www.cnblogs.com/phpres/p/15407566.html