0

我有这个网络服务:
https ://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl

Web 服务具有bpPayRequest接受 10 个参数作为 Web 服务提供者的方法,其定义如下:

bpPayRequest(long terminalID, string username, string password, long orderID, long amount, string localDate, string localTime, string additionalData, string callbackURL, long payerID)

我正在使用 ASP Classic,这是我的代码:

<%
RedirectURL = "http://" & Request.ServerVariables("SERVER_NAME") & "/Frontend/epayverify_l2.asp"

set oSOAPay = Server.CreateObject("MSSOAP.SoapClient30")
oSOAPay.ClientProperty("ServerHTTPRequest") = True
on error resume next
oSOAPay.mssoapinit(webServiceAddr)
oSOAPay.ConnectorProperty("UseSSL") = False 
if err.number <> 0 Then
    if DebugMode Then
        rwbr err.description
        response.end
    Else
        epayAction = false
        this_error = "banknotresponse"
        Exit for
    End if
End if
on error goto 0

result = oSOAPay.bpPayRequest(_
    CLng(str_terminal), _
    CStr(M_ID), _
    "password", _
    CLng(int_orderID), _
    CLng(Amount), _
    "20130610", _
    "102030", _
    "", _
    CStr(RedirectURL), _
    0)
%>

这是result = oSOAPay.bpPayRequest具有值的参数:

oSOAPay.bpPayRequest( 709499, "11111", "password", 2, 1000, "20130610", "102030", "", "http://mitranik.com/Frontend/epayverify_l2.asp", 0 )

问题是当我运行这段代码时,我得到了这个错误。

Client:Incorrect number of parameters supplied for SOAP request HRESULT=0x80070057: The parameter is incorrect. - Client:Unspecified client error. HRESULT=0x80070057: The parameter is incorrect.

我在这里错过了什么吗?

4

1 回答 1

1

Web 方法需要 9 个参数:

  1. 长终端ID
  2. 字符串用户名
  3. 字符串密码
  4. 长订单ID
  5. 长金额
  6. 字符串本地日期
  7. 字符串本地时间
  8. 字符串回调URL
  9. 长付款人ID

然而,当你使用它时,你给它 10 个参数:

  1. CLng(str_terminal)
  2. CStr(M_ID)
  3. “密码”
  4. CLng(int_orderID)
  5. CLng(数量)
  6. “20130610”
  7. “102030”
  8. “”
  9. CStr(重定向URL)
  10. 0

参数#8(它是固定的空字符串)是罪魁祸首,只需摆脱它:

result = oSOAPay.bpPayRequest(_
    CLng(str_terminal), _
    CStr(M_ID), _
    "password", _
    CLng(int_orderID), _
    CLng(Amount), _
    "20130610", _
    "102030", _
    CStr(RedirectURL), _
    0)
于 2013-06-11T11:39:39.137 回答