Paysafe 的 TxnMode 错误 API

TxnMode error for Paysafe API

我一直在尝试让示例 Web 服务请求通过,但我一直收到错误消息。查看我的设置。

账号:89994061 店铺编号:test 存储密码:test

示例请求(代码)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<title>Credit Card Test</title>
<body>
<form NAME="Credit Card" METHOD="post"
ACTION="https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1">
<input type=hidden name="txnmode" value="ccAuthorize" >
<b>XML Message body:</b>
<TEXTAREA class="xmlbox" name="txnRequest" COLS=100 ROWS=10 >
<ccAuthRequestV1 xmlns="http://www.optimalpayments.com/creditcard/xmlschema/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.optimalpayments.com/creditcard/xmlschema/v1">
<merchantAccount>
<accountNum>89994061</accountNum>
<storeID>test</storeID>
<storePwd>test</storePwd>
</merchantAccount>
<merchantRefNum>Ref-12345</merchantRefNum>
<amount>10.00</amount>
<card>
<cardNum>4XXXXXXXXXXXXXX1</cardNum>
<cardExpiry>
<month>11</month>
<year>2015</year>
</cardExpiry>
<cardType>VI</cardType>
<cvdIndicator>1</cvdIndicator>
<cvd>111</cvd>
</card>
<authentication>
<indicator>05</indicator>
<cavv>AAABB4WZlQAAAAAAcJmVENiWiV+=</cavv>
<xid>Q2prWUI2RFNBc3FOTXNlem50eWY=</xid>
</authentication>
<billingDetails>
<cardPayMethod>WEB</cardPayMethod>
<firstName>Jane</firstName>
<lastName>Jones</lastName>
<street>123 Main Street</street>
<city>LA</city>
<state>CA</state>
<country>US</country>
<zip>90210</zip>
<phone>555-555-5555</phone>
<email>janejones@emailserver.com</email>
</billingDetails>
<shippingDetails>
<carrier>FEX</carrier>
<shipMethod>T</shipMethod>
<firstName>Jane</firstName>
<lastName>Jones</lastName>
<street>44 Main Street</street>
<city>LA</city>
<state>CA</state>
<country>US</country>
<zip>90210</zip>
<phone>555-555-5555</phone>
<email>janejones@emailserver.com</email>
</shippingDetails>
<recurring>
<recurringIndicator>I</recurringIndicator>
<originalConfirmationNumber>115147689</originalConfirmationNumber>
</recurring>
<customerIP>127.0.0.1</customerIP>
<productType>M</productType>
<addendumData>
<tag>CUST_ACCT_OPEN_DATE</tag>
<value>20041012</value>
</addendumData>
<addendumData>
<tag>MERCHANT_COUNTRY_CODE</tag>
<value>US</value>
</addendumData>
<addendumData>
<tag>SERVICE_REQUEST_CURRENCY</tag>
<value>on</value>
</addendumData>
</ccAuthRequestV1>
</TEXTAREA>
<br>
<input TYPE=submit class=input VALUE="Send Request">
</form>
</body>
</html>

收到错误

必需的字符串参数 'txnMode' 不存在

这正是文档中的要求,它对我不起作用。我在做什么是不正确的?任何输入将不胜感激。

乍一看似乎一切都很好。但是代码中有一个小错误。您在 HTML POST

中有以下行
<input type=hidden name="txnmode" value="ccAuthorize" >

正确的做法如下

<input type=hidden name="txnMode" value="ccAuthorize" >

问题是实际的 txnMode 名称拼写错误。这是区分大小写的。进行此更改后,您应该会收到来自 Web 服务的正确响应 API。