diff --git a/mobile/plugins/payment/wxpay.php b/mobile/plugins/payment/wxpay.php index 44f3255..e9b46a2 100755 --- a/mobile/plugins/payment/wxpay.php +++ b/mobile/plugins/payment/wxpay.php @@ -179,7 +179,6 @@ class wxpay require_once(BASE_PATH . 'helpers/dalianpay/demo/dalianpay.php'); $new_plugin = new dalianpay(); - $response_data = $new_plugin->pay($this->encrypt($_SESSION['openid']), $order['order_sn'], $order_amount); echo $response_data; // echo "1234"; diff --git a/mobile/source/helpers/dalianpay/config/config.php b/mobile/source/helpers/dalianpay/config/config.php index 018c392..9925d6a 100644 --- a/mobile/source/helpers/dalianpay/config/config.php +++ b/mobile/source/helpers/dalianpay/config/config.php @@ -11,6 +11,10 @@ 'producp' => 'JX0002', // 版本 'version' => '11', + // 交易类型 + 'transtype' => 'JSP501', // 微信支付 + // 交易方式 + 'paytype' => 'W02', // 微信js支付 // 门店号 'branchno' => '44', // 终端号 diff --git a/mobile/source/helpers/dalianpay/demo/dalianpay.php b/mobile/source/helpers/dalianpay/demo/dalianpay.php index d5b1d15..ad61633 100644 --- a/mobile/source/helpers/dalianpay/demo/dalianpay.php +++ b/mobile/source/helpers/dalianpay/demo/dalianpay.php @@ -73,9 +73,9 @@ class dalianpay{ 'version' => $config['version'], 'trxamt' => $trxamt, // total_fee 'reqsn' => $reqsn, // 交易订单号 - 'producp' => 'JX0002', - 'transtype' => 'JSP501', // 微信支付 - 'paytype' => 'W02', // 微信js支付 + 'producp' => $config['producp'], + 'transtype' => $config['transtype'], // 微信支付 + 'paytype' => $config['paytype'], // 微信js支付 'randomstr' => md5( uniqid() ), // 'body' => 'pages', 'acct' => $openid, @@ -100,6 +100,7 @@ class dalianpay{ // 加密交易报文 $crypted_trade_data = $Base->Crypt->encryptTradeData($trade_data); + return $crypted_trade_data; // sc_test if($crypted_trade_data === false) { // echo $Base->Crypt->err_msg;