mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-01 11:29:59 +08:00
pay debug
This commit is contained in:
parent
ae87b20f71
commit
68a74805f3
@ -100,14 +100,10 @@ class OrderService
|
|||||||
$call_back_url = MyUrl('index/order/respond', ['paymentname'=>$payment[0]['payment']]);
|
$call_back_url = MyUrl('index/order/respond', ['paymentname'=>$payment[0]['payment']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开放平台用户penid
|
|
||||||
$temp_key = APPLICATION_CLIENT_TYPE.'_openid';
|
|
||||||
$user_openid = isset($params['user'][$temp_key]) ? $params['user'][$temp_key] : '';
|
|
||||||
|
|
||||||
// 发起支付
|
// 发起支付
|
||||||
$pay_data = array(
|
$pay_data = array(
|
||||||
|
'user' => $params['user'],
|
||||||
'out_user' => md5($params['user']['id']),
|
'out_user' => md5($params['user']['id']),
|
||||||
'user_openid' => $user_openid,
|
|
||||||
'order_no' => $order['order_no'],
|
'order_no' => $order['order_no'],
|
||||||
'name' => '订单支付',
|
'name' => '订单支付',
|
||||||
'total_price' => $order['total_price'],
|
'total_price' => $order['total_price'],
|
||||||
|
@ -130,7 +130,7 @@ class AlipayMini
|
|||||||
'subject' => $params['name'],
|
'subject' => $params['name'],
|
||||||
'out_trade_no' => $params['order_no'],
|
'out_trade_no' => $params['order_no'],
|
||||||
'total_amount' => $params['total_price'],
|
'total_amount' => $params['total_price'],
|
||||||
'buyer_id' => $params['user_openid'],
|
'buyer_id' => $params['user']['alipay_openid'],
|
||||||
);
|
);
|
||||||
$parameter['biz_content'] = json_encode($biz_content, JSON_UNESCAPED_UNICODE);
|
$parameter['biz_content'] = json_encode($biz_content, JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ class WeixinMini
|
|||||||
'body' => $params['site_name'].'-'.$params['name'],
|
'body' => $params['site_name'].'-'.$params['name'],
|
||||||
'nonce_str' => md5(time().rand().$params['order_no']),
|
'nonce_str' => md5(time().rand().$params['order_no']),
|
||||||
'notify_url' => $params['notify_url'],
|
'notify_url' => $params['notify_url'],
|
||||||
'openid' => $params['user_openid'],
|
'openid' => $params['user']['weixin_openid'],
|
||||||
'out_trade_no' => $params['order_no'].GetNumberCode(6),
|
'out_trade_no' => $params['order_no'].GetNumberCode(6),
|
||||||
'spbill_create_ip' => GetClientIP(),
|
'spbill_create_ip' => GetClientIP(),
|
||||||
'total_fee' => intval($params['total_price']*100),
|
'total_fee' => intval($params['total_price']*100),
|
||||||
|
Loading…
Reference in New Issue
Block a user