Files
youlegames/codes/agent/game/api/sample/onlinepay.html
2026-03-15 01:27:05 +08:00

73 lines
3.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html>
<head>
<meta charset='UTF-8'>
</head>
<script src='source/login/js/jquery-2.1.4.min.js'></script>
<script src='source/login/js/common.js'></script>
<body id="mainbody">
<!--form style='display:none;' id='form_next' name='form_next' method='post' action='https://api.tscce.cn/api/newpay/pay/online/'>
<input name='appid' type='text' value='14936872341446' /> /// 应用标识
<input name='devkey' type='text' value='14915485974028'/> /// 开发者key
<input name='sid' type='text' value='0000'/> /// 用户登录后的sid
<input name='scode' type='text' value='0000'/> /// 用户登录后的scode
<input name='orderid' type='text' value='10016'/> /// 订单编号
<input name='fee' type='text' value='1' /> /// 支付金额 单位分
<input name='title' type='text' value='test'/> /// 支付标题
<input name='notice_url' type='text' value='https://api.tscce.cn/1.php'/> /// 支付成功后的通知页面(异步通知)
<input name='return_url' type='text' value='https://api.tscce.cn/1.php'/> /// 支付成功后的跳转页面(同步跳转)
<input name='paytype' type='text' value='1'/> /// 支付类型 1微信网页支付2支付宝网页支付3威富通聚合支付-微信网页支付4威富通聚合支付-支付宝网页支付
/// 以下为附加参数,会在通知回调时返回。
<input name='p1' type='text' value='参数一'/>
<input name='p2' type='text' value='参数二'/>
支付成功后返回的数据格式为标准网页参数格式。其中:
order_no: 订单号
out_trade_no: 平台订单号
transaction_id: 三方订单号(微信或支付宝等)
total_fee: 支付金额(单位分)
用户支付时附带的自定义参数。
sign: 参数签名(必须)
</form-->
<script type='text/javascript'>
var sid = getQueryString('sid');
var scode = getQueryString('scode');
function load_submit() {
//document.form_next.submit();
document.getElementById('form_next').submit();
}
if (sid && scode) {
var form =
'<form style="display:none;" id="form_next" name="form_next" method="post" action="https://api.tscce.cn/api/newpay/pay/online/">\r\n' +
' <input name="appid" type="text" value="14936872341446" />\r\n' +
' <input name="devkey" type="text" value="14915485974028"/>\r\n' +
' <input name="sid" type="text" value="{v_sid}"/>\r\n' +
' <input name="scode" type="text" value="{v_scode}"/>\r\n' +
' <input name="orderid" type="text" value="10018"/>\r\n' +
' <input name="fee" type="text" value="1" />\r\n' +
' <input name="title" type="text" value="test"/>\r\n' +
' <input name="notice_url" type="text" value="https://api.tscce.cn/1.php"/>\r\n' +
' <input name="return_url" type="text" value="https://api.tscce.cn/1.php"/>\r\n' +
' <input name="paytype" type="text" value="1"/>\r\n' +
' <input name="p1" type="text" value="参数一"/>\r\n' +
' <input name="p2" type="text" value="参数二"/>\r\n' +
' <input name="version" type="text" value="1"/>\r\n' +
' <input name="sign" type="text" value=""/>\r\n' +
'</form>\r\n';
$('#mainbody').append(form.format({'v_sid':sid, 'v_scode':scode}));
load_submit();
} else {
window.location = 'https://api.tscce.cn/source/login/login.php?' +
'app_id=14936872341446&' +
'dev_key=14915485974028&' +
'market_key=test&' +
'redirect_uri=' + window.location;
}
</script>
</body>
</html>