我對使用網關突然出現的付款過程有疑問。我必須向網關提供所有變量,並在收取費用時得到答案。如果所有數據都是正確的,我可以收取費用,但我不知道如何從網關接收答案,手冊給了我一個線索,答案將在變量「urlBack」中提供。你知道如何從這個網關獲取數據嗎?錯誤網關響應
首先我在javascript中處理所有日期,然後使用以下代碼發送信息,但我將在另一頁(https://acmax.mx/popup_2)中收到答案。所有的作品都很好,但是我對網關的回答有問題。
感謝這麼多
<form name="myPayTC" id="myPayTC" method="post" action="https://www.procom.prosa.com.mx/eMerchant/7727222_acmaxdemexico.jsp" onload='javascript:MyFrmOnLoad();'>
<input type="hidden" id="total" name="total" value='total'>
<input type="hidden" id="currency" name="currency" value="484">
<input type="hidden" id="address" name="address" value="ACMAX">
<input type="hidden" id="order_id" name="order_id" value='order_id'>
<input type="hidden" id="merchant" name="merchant" value="7727222">
<input type="hidden" id="store" name="store" value="1234">
<input type="hidden" id="term" name="term" value="001">
<input type="hidden" id="digest" name="digest" value='valDigest'>
<input type="hidden" id="return_target" name="return_target" value="N/A">
<!--<input type="hidden" id="urlBack" name="urlBack" value="https://acmax.mx/index.php?controller=ComercioResp">-->
<!--<input type="hidden" id="urlBack" name="urlBack" value="https://acmax.mx/es/checkout/confirm">-->
<input type="hidden" id="urlBack" name="urlBack" value="https://acmax.mx/popup_2">
<!--<input type="hidden" id="urlBack" name="urlBack" value="http://acmax.mx/es/checkout/paymentmethod">-->
<p><img src="https://acmax.mx/themes/theme674/img//bankwire.jpg" alt="Pago por tarjeta de crédito/débito" width="86" height="54" /> <input type="submit" name="pButton" value="Pago con Tarjeta de Crédito/Débito" class="exclusive" style="font-size:14px; height:28px;"></p>
</form>
具有服務器的代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML version="-//W3C//DTD HTML 4.01 Transitional//EN">
<HEAD>
<TITLE>Verificacion de Compra</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY>
<form id="formars" name="formars" action="https://acmax.mx/popup_2" method="post">
<input type="Hidden" name="EM_Response" value="denied">
<input type="Hidden" name="EM_Total" value="102">
<input type="Hidden" name="EM_OrderID" value="625">
<input type="Hidden" name="EM_Merchant" value="7727222">
<input type="Hidden" name="EM_Store" value="1234">
<input type="Hidden" name="EM_Term" value="001">
<input type="Hidden" name="EM_RefNum" value="initialrefnum">
<input type="Hidden" name="EM_Auth" value="000000">
<input type="Hidden" name="EM_Digest" value="initialdigest">
<input type="Hidden" name="cc_number" value="0565">
<input type="Hidden" name="total" value="102">
<input type="Hidden" name="order_id" value="625">
<input type="Hidden" name="merchant" value="7727222">
<input type="Hidden" name="tx_id" value="322307f91ef2b5318e5d720f49fb30dace2ca474">
<input name="pButton" value="Pago con Tarjeta de Crédito/Débito" type="Hidden" />
<input name="address" value="ACMAX" type="Hidden" />
</form>
<script type="text/javascript">
var formars = document.getElementById('formars');
formars.submit();
</script>
</BODY>
</HTML>
我不能改變這個代碼,所以我需要從表格中獲取數據「 formars「
他們將最有可能發出一個'POST'請求到您提供的'urlBack'參數,任何人的網關是URL,他們應該有對數據字段他們回來後的指令。然後你可以用你可用的任何語言,.NET,PHP等解析數據。 – mikeyq6
謝謝「mikeyq6」我有參數表示網關返回,但我不知道如何獲取這個數據, –