...
|
...
|
@@ -43,6 +43,7 @@ class PayController extends HomeBaseController |
|
|
if($data['state'] != 4){
|
|
|
$this->error('订单不是待支付状态','','','');
|
|
|
}
|
|
|
$openid = Db::name('third_party_user')->where('user_id',$data['uid'])->value('openid');
|
|
|
$attributes = [
|
|
|
'trade_type' => 'JSAPI',
|
|
|
'body' => '百荣科技',
|
...
|
...
|
@@ -50,7 +51,7 @@ class PayController extends HomeBaseController |
|
|
'out_trade_no' => $data['order_number'],
|
|
|
'total_fee' => $data['money']*100, // 单位:分
|
|
|
'notify_url' => url('portal/pay/notify','','',true), // 支付结果通知网址,如果不设置则会使用配置里的默认地址
|
|
|
'openid' => cmf_get_current_user_openid(), // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识,
|
|
|
'openid' => $openid, // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识,
|
|
|
];
|
|
|
$order = new Order($attributes);
|
|
|
|
...
|
...
|
|