因此,我试图在我的order.html页面上包括付款API结帐,但是,您必须在HTML文档的开头添加脚本。在脚本中,您必须将小计金额指定为数字,但是我需要此值是动态的。“总计”是小计金额。我需要将小计设为“总计”。我该怎么做?
<head>
<script type="text/javascript">
function paymentApi() {
V.init({
apikey: "",
encryptionKey: "",
paymentRequest: {
currencyCode: "USD",
subtotal: "11.00"
}
});
</script>
</head>
<body>
<p id="sub-total">
<strong>Total</strong>: <span id="stotal"></span>
</p>
Run Code Online (Sandbox Code Playgroud)