//要引入文件地址 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;//失败
}
}