This commit is contained in:
aozhiwei 2020-10-19 14:26:48 +08:00
parent f715cad303
commit d83692f64c

View File

@ -19,22 +19,22 @@ class UnifiedWeiXin extends BaseSdk {
public function preOrder() public function preOrder()
{ {
$params = array( $params = array(
'appid' => '1517300671', 'appid' => 'wx9b006ee01033cec7',
'mch_id' => 'aFUFoU2weMEqQouNvYLyMB23xJppuw5w', 'mch_id' => '1509252791',
'nonce_str' => uniqid('201019'), 'nonce_str' => uniqid('201019'),
'body' => '', 'body' => '',
'out_trade_no' => '', 'out_trade_no' => uniqid('201019'),
'total_fee' => '', 'total_fee' => '0.01',
'spbill_create_ip' => phpcommon\getIPv4(), 'spbill_create_ip' => phpcommon\getIPv4(),
'notify_url' => 'https://gamepay.kingsome.cn/webapp/paynotify/unified_weixin.php', 'notify_url' => 'https://gamepay.kingsome.cn/webapp/paynotify/unified_weixin.php',
'trade_type' => '', 'trade_type' => 'MWEB',
'scene_info' => '', 'scene_info' => '',
); );
if (SERVER_ENV != _ONLINE) { if (SERVER_ENV != _ONLINE) {
$params['notify_url'] = 'https://gamepay-test.kingsome.cn/webapp/paynotify/unified_weixin.php'; $params['notify_url'] = 'https://gamepay-test.kingsome.cn/webapp/paynotify/unified_weixin.php';
} }
$sign = phpcommon\wxPaySign($params, $sign = phpcommon\wxPaySign($params,
'' 'ZTlMqTh5lRNefcH2KHroQqxdShEiedD0'
); );
$params['sign'] = strtoupper($sign); $params['sign'] = strtoupper($sign);
error_log(json_encode($params)); error_log(json_encode($params));