<?php require_once '../wx_dev.php'; require_once '../srvc_pay_api.php'; utils_init(); $err = null; $vars = "\n <xml>\n <appid>wx2421b1c4370ec43b</appid>\n <attach>支付测试</attach>\n <body>JSAPI支付测试</body>\n <mch_id>10000100</mch_id>\n <nonce_str>1add1a30ac87aa2db72f57a2375d8fec</nonce_str>\n <notify_url>http://wxpay.weixin.qq.com/pub_v2/pay/notify.v2.php</notify_url>\n <openid>oUpF8uMuAJO_M2pxb1Q9zNjWeS6o</openid>\n <out_trade_no>1415659990</out_trade_no>\n <spbill_create_ip>14.23.150.211</spbill_create_ip>\n <total_fee>1</total_fee>\n <trade_type>JSAPI</trade_type>\n <sign>0CB01533B8C1EF103065174F50BCA001</sign>\n </xml>"; $js_pay = srvc_pay_api_order("JSAPI支付测试", 2, "TOOWXTEST" . date("YmdHis", time()), "", "支付测试", TOO_HOME_URL . "/wx/pay/srvc_pay_api_notify_test.php"); ?> <html> <head> <?php echo $js_pay; ?> </head> </html>
$total *= $discount_rate; $param = array("C" => "{$count}", "T" => "{$total}", "VD" => "{$visit_day}", "TS" => "{$time_slot}", "BS" => "{$small_board}", "BM" => "{$medium_board}", "BL" => "{$large_board}", "PH" => "{$phone}"); $json = json_encode($param); // X大Y中Z小 $board_tips = ""; if ($large_board > 0) { $board_tips = $board_tips . "{$large_board}" . "大"; } if ($medium_board > 0) { $board_tips = $board_tips . "{$medium_board}" . "中"; } if ($small_board > 0) { $board_tips = $board_tips . "{$small_board}" . "小"; } $pay_body = "Too塗画室" . "{$count}" . "人券(" . "{$board_tips}" . ")"; $js_pay = srvc_pay_api_order($pay_body, $total, $ttoken, "", $json, TOO_HOME_URL . "/wx/srvc_pay_api_notify.php"); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="format-detection" content="telephone=no" /> <meta name="format-detection" content="email=no" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <link rel="stylesheet" href="./css/base.css" type="text/css"/> <link rel="stylesheet" href="./css/book-default.css" type="text/css"/> <title>微信付款</title>