提交 eb593ebe 编写于 作者: D devil_gong

pay debug

上级 eeb6c8ea
......@@ -142,7 +142,7 @@ class PayEase
'merchantId' => $this->config['merchantId'],
'orderAmount' => $params['total_price']*100,
'orderCurrency' => 'CNY',
'requestId' => $params['order_no'],
'requestId' => $params['order_no'].GetNumberCode(6),
'notifyUrl' => $params['notify_url'],
'callbackUrl' => $params['call_back_url'],
];
......@@ -191,7 +191,7 @@ class PayEase
// 同步返回,直接进入订单详情页面
if(substr(CurrentScriptName(), -20) == '_payease_respond.php' && empty($params['hmac']) && !empty($params['requestId']))
{
exit(header('location:'.MyUrl('index/order/detail', ['orderno'=>$params['requestId']])));
exit(header('location:'.MyUrl('index/order/detail', ['orderno'=>substr($params['requestId'], 0, strlen($params['requestId'])-6)])));
}
......@@ -228,7 +228,7 @@ class PayEase
private function ReturnData($data)
{
// 参数处理
$out_trade_no = $data['requestId'];
$out_trade_no = substr($data['requestId'], 0, strlen($data['requestId'])-6);
// 返回数据固定基础参数
$data['trade_no'] = isset($data['serialNumber']) ? $data['serialNumber'] : ''; // 支付平台 - 订单号
......@@ -286,10 +286,9 @@ class PayEase
$public_key = ROOT.'rsakeys/server.cer';
$data = [
'merchantId' => $this->config['merchantId'],
'requestId' => $params['order_no'],
'requestId' => $params['order_no'].GetNumberCode(6),
'amount' => $params['refund_price']*100,
'orderId' => $params['trade_no'],
//'notifyUrl' => $params['notify_url'],
'remark' => $refund_reason,
];
$str = $this->buildJson($private_key, $this->config['password'], $data);
......@@ -315,6 +314,7 @@ class PayEase
'refund_price' => isset($result['amount']) ? $result['amount']/100 : 0.00,
'return_params' => $ret['data'],
];
print_r($data);die;
return DataReturn('退款成功', 0, $data);
}
return $ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册