diff --git a/mobile/dalianpay/demo/pay.php b/mobile/dalianpay/demo/pay.php index c957f63..8f5a098 100644 --- a/mobile/dalianpay/demo/pay.php +++ b/mobile/dalianpay/demo/pay.php @@ -5,6 +5,7 @@ // $openid = $_SESSION['openid']; $openid = $_GET['openid']; $reqsn = $_GET['reqsn']; + $trxamt = $_GET['trxamt']; var_dump($openid); $redirect_url = $_SESSION['prev_url']; // unset($_SESSION['prev_url']); @@ -38,7 +39,7 @@ 'branchno' => $config['branchno'], // 'termcode' => $config['termcode'], 'version' => $config['version'], - 'trxamt' => '1', // total_fee + 'trxamt' => $trxamt, // total_fee 'reqsn' => $reqsn, // 交易订单号 'producp' => 'JX0002', 'transtype' => 'JSP501', // 微信支付 diff --git a/mobile/plugins/payment/wxpay.php b/mobile/plugins/payment/wxpay.php index 1f4f238..471d5e5 100755 --- a/mobile/plugins/payment/wxpay.php +++ b/mobile/plugins/payment/wxpay.php @@ -197,13 +197,14 @@ class wxpay // $_SESSION['openid'] = $openid; $_SESSION['openid'] = 'oCTanxBeiVFWlekJT_GiPZM2UiGY'; //sc_test } - + $order_amount = $order['order_amount'] * 100; + // 访问大连支付接口 $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; var_dump($url); $_SESSION['prev_url'] = $url; var_dump($_SESSION['prev_url']); - header('Location: https://shop.heavenk.com/mobile/dalianpay/demo/pay.php?openid=' . $_SESSION['openid'] . '&reqsn=' . $order['order_sn']); + header('Location: https://shop.heavenk.com/mobile/dalianpay/demo/pay.php?openid=' . $_SESSION['openid'] . '&reqsn=' . $order['order_sn'] . '$trxamt=' . $order_amount); // // header('Location: https://www.baidu.com'); // exit; // 终止当前脚本的执行,确保页面跳转生效 // require_once('../../demo/pay.php');