如何在阿里巴巴B2B交易平台脚本中使用Nochex支付网关测试支付?

时间:2013-02-28 08:43:44

标签: testing payment-gateway

我在Nochex支付网关中遇到问题,在测试模式下测试付款。

我已设定以下详细信息,但无效。

      echo '<form action="https://www.nochex.com/nochex.dll/checkout" name="form1" id="frm1" method="post"><input type="hidden" name="email" value="'.$rowsettings['nochex'].'">';
            echo '<input type="hidden" name="amount" value="'.$rowsettings['goldmemberfee'].'">';
            echo '<input type="hidden" name="ordernumber" value="'.$_SESSION['SellerID'].'">';
            echo '<input type="hidden" name="description" value="Gold Member Update for '.$_SESSION['BusinessEmail'].'">'; 
            echo '<input type="hidden" name ="test_transaction" value="100">';
            echo '<input type="hidden" name ="test_success_url" value= "successurl">';                  
            echo "<input type='hidden' name='returnurl' value='".$rowsettings['url']."/goldmember.php?ncid=".$_SESSION['SellerID']."'>";
            echo "<input type='hidden' name='cancelurl' value='".$rowsettings['url']."/fail.php'>";
            echo ".";

感谢。

1 个答案:

答案 0 :(得分:0)

您使用的是旧版Nochex Checkout,它仍然有用,但不是最佳做法。本文档将向您展示如何升级到新的付款页面系统:

https://esupport.nochex.com/index.php?_m=downloads&_a=viewdownload&downloaditemid=4&nav=0,12

基本上是一种更改表单发布的地址和某些变量名称的情况。

您的新表单应如下所示:

    echo '<form method="POST" action="https://secure.nochex.com" name="form1" id="frm1">';
    echo '<input type="hidden" name="merchant_id" value="'.$rowsettings['nochex'].'">';
    echo '<input type="hidden" name="amount" value="'.$rowsettings['goldmemberfee'].'">';
    echo '<input type="hidden" name="order_id" value="'.$_SESSION['SellerID'].'">';
    echo '<input type="hidden" name="description" value="Gold Member Update for '.$_SESSION['BusinessEmail'].'">';
    echo '<input type="hidden" name="test_transaction" value="100">';
    echo '<input type="hidden" name="test_success_url" value= "successurl">';
    echo '<input type='hidden' name='success_url' value='".$rowsettings['url']."/goldmember.php?ncid=".$_SESSION['SellerID']."'>';
    echo '<input type='hidden' name='cancel_url' value='".$rowsettings['url']."/fail.php'>';
    echo '</form>';