pay debug

This commit is contained in:
devil_gong 2019-01-08 14:14:53 +08:00
parent ae87b20f71
commit 68a74805f3
3 changed files with 3 additions and 7 deletions

View File

@ -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'],

View File

@ -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);

View File

@ -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),