kevin_zhangl 2 lat temu
rodzic
commit
366f57a107
2 zmienionych plików z 75 dodań i 13 usunięć
  1. 17 13
      frontendEle/src/views/shop/order-overseas.vue
  2. 58 0
      pay/pay.html

+ 17 - 13
frontendEle/src/views/shop/order-overseas.vue

@@ -272,20 +272,24 @@
               }).then(() => {
                 network.postData(`shop/sure-approach-order`, data).then(response => {
                   this.submitButtonStat = false
-                  // 唤起支付页面
-                  network.postData(`shop/i-pay88`, { Amount: response.ORDER_AMOUNT, RefNo: response.SN }).then(payment => {
-                    this.actionUrl = payment.transactionUrl
-                    this.form = payment.paymentFields
 
-                    this.visible = true
-                    this.payLoading = false
-                  }).catch(err => {
-                    this.$message({
-                      message: err,
-                      type: 'error'
-                    })
-                    this.submitButtonStat = false
-                  })
+                  // 跳转到中转页面
+                  location.href = 'http://nc-fele-mips.elken.com:8016/pay.html?RefNo=' + response.SN
+
+                  // 唤起支付页面
+                  // network.postData(`shop/i-pay88`, { Amount: response.ORDER_AMOUNT, RefNo: response.SN }).then(payment => {
+                  //   this.actionUrl = payment.transactionUrl
+                  //   this.form = payment.paymentFields
+                  //
+                  //   this.visible = true
+                  //   this.payLoading = false
+                  // }).catch(err => {
+                  //   this.$message({
+                  //     message: err,
+                  //     type: 'error'
+                  //   })
+                  //   this.submitButtonStat = false
+                  // })
                 })
               }).catch(err => {
                 this.$message({

+ 58 - 0
pay/pay.html

@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>pay</title>
+</head>
+<body>
+	<FORM method="post" name="ePayment" action="https://payment.ipay88.com.my/epayment/entry.asp">
+		<INPUT type="hidden" id="MerchantCode" name="MerchantCode"  value="">
+		<INPUT type="hidden" id="PaymentId" name="PaymentId" value="">
+		<INPUT type="hidden" id="RefNo" name="RefNo" value="">
+		<INPUT type="hidden" id="Amount" name="Amount"  value="">
+		<INPUT type="hidden" id="Currency" name="Currency"  value="">
+		<INPUT type="hidden" id="ProdDesc" name="ProdDesc"  value="">
+		<INPUT type="hidden" id="UserName" name="UserName"  value="">
+		<INPUT type="hidden" id="UserEmail" name="UserEmail" value="">
+		<INPUT type="hidden" id="UserContact"  name="UserContact" value="">
+		<INPUT type="hidden" id="Remark" name="Remark"  value="">
+		<INPUT type="hidden" id="Lang" name="Lang"  value="">
+		<INPUT type="hidden" id="SignatureType" name="SignatureType" value="SHA256">
+		<INPUT type="hidden" id="Signature" name="Signature" value="">
+		<INPUT type="hidden" id="ResponseURL" name="ResponseURL" value="">
+		<INPUT type="hidden" id="BackendURL" name="BackendURL" value="">
+		<span style="display: inline-block; margin: 0 auto;">因汇率波动,实际支付金额可能会有浮动</span><br /><br />
+		<INPUT type="submit" value="Proceed with Payment" name="Submit">
+	</FORM> 
+</body>
+<script type="text/javascript" src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
+<script>
+	function getQueryString(name,url) {
+		let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+		let r = url.substr(1).match(reg);
+	    if (r != null) { 
+	        return unescape(r[2]); 
+	    }
+	    return null;
+	}
+	
+	let RefNo = getQueryString('RefNo', window.location.search);
+	$(function(){
+		$.post('http://16.163.228.151:8013/v1/shop/i-pay88', {'RefNo': RefNo}, function(res) {
+			$("#Amount").val( res.paymentFields.Amount);
+			$("#BackendURL").val( res.paymentFields.BackendURL);
+			$("#Currency").val( res.paymentFields.Currency);
+			$("#Lang").val( res.paymentFields.Lang);
+			$("#MerchantCode").val( res.paymentFields.MerchantCode);
+			$("#PaymentId").val( res.paymentFields.PaymentId);
+			$("#ProdDesc").val( res.paymentFields.ProdDesc);
+			$("#RefNo").val( res.paymentFields.RefNo);
+			$("#ResponseURL").val( res.paymentFields.ResponseURL);
+			$("#Signature").val( res.paymentFields.Signature);
+			$("#UserContact").val( res.paymentFields.UserContact);
+			$("#UserEmail").val( res.paymentFields.UserEmail);
+			$("#UserName").val( res.paymentFields.UserName);
+		})
+	});
+</script>
+</html>