我一直在尝试获取示例Web服务请求,并且一直收到错误消息。请参阅我的设置。
帐号:89994061 商店ID:测试 存储密码:测试
样品申请(代码)
<!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'不存在
这是文档中的确切请求,但它对我不起作用。我在做什么是不正确的?任何输入将不胜感激。
答案 0 :(得分:1)
<input type=hidden name="txnmode" value="ccAuthorize" >
正确的做法是以下
<input type=hidden name="txnMode" value="ccAuthorize" >
问题是实际的txnMode名称拼写错误。这是区分大小写的。进行此更改后,您应该从Web服务API收到适当的响应。