Asp.net 支付网关集成错误解决

Asp.net 支付网关集成错误解决,asp.net,asp.net-mvc-3,paypal,payment,Asp.net,Asp.net Mvc 3,Paypal,Payment,我有一个需要支付网关集成的windows应用程序。 这些都是我做的 该过程包括以下内容。。。 -创建Xml请求头 -将其编码为Url -使用文档中提供的链接将url编码的数据发送到RESTAPI。 -测试服务器执行事务并将响应发送回应用程序 我为实现这些功能所做的 1) 我使用了“HttpWebRequest”类来创建对URL的请求:我不会共享它,因为它是安全和机密的 2) 我已经生成了xml头并将其作为url编码发送 3) 服务器甚至可以将响应返回到应用程序。但以地位而不是成功 我将发布请求格

我有一个需要支付网关集成的windows应用程序。 这些都是我做的

该过程包括以下内容。。。 -创建Xml请求头 -将其编码为Url -使用文档中提供的链接将url编码的数据发送到RESTAPI。 -测试服务器执行事务并将响应发送回应用程序

我为实现这些功能所做的

1) 我使用了“HttpWebRequest”类来创建对URL的请求:我不会共享它,因为它是安全和机密的

2) 我已经生成了xml头并将其作为url编码发送

3) 服务器甚至可以将响应返回到应用程序。但以地位而不是成功

我将发布请求格式和响应格式

<?xml version="1.0" encoding="UTF-8"?>
    <payment xmlns="http://www.elastic-payments.com/schema/payment">
        <merchant-account-id>!@-merchant-account-id-@!</merchant-account-id>
        <request-id>!@-request-id-@!</request-id>
        <transaction-type>purchase</transaction-type>
        <requested-amount currency="AUD">!@-requested-amount-@!</requested-amount>
        <account-holder>
            <first-name>!@-first-name-@!</first-name>
            <last-name>!@-last-name-@!</last-name>
            <email>!@-email-@!</email>
            <phone>!@-phone-@!</phone>
            <address>
                <street1>!@-street1-@!</street1>
                <street2>!@-street2-@!</street2>
                <city>!@-city-@!</city>
                <state>!@-state-@!</state>
                <country>!@-country-@!</country>
                <postal-code>!@-postal-code-@!</postal-code>
            </address>
        </account-holder>
        <card>
            <account-number>!@-account-number-@!</account-number>
            <expiration-month>!@-expiration-month-@!</expiration-month>
            <expiration-year>!@-expiration-year-@!</expiration-year>
            <card-type>!@-card-type-@!</card-type>
            <card-security-code>!@-card-security-code-@!</card-security-code>
        </card>
        <notifications>
            <notification url="!@-notification-url-@!" transaction-state="failed" />
            <notification url="!@-notification-mail-@!" />
        </notifications>
        <custom-fields>
            <custom-field field-name="order no" field-value="!@-order no-@!" />
        </custom-fields>
       <ip-address>!@-ip-address-@!</ip-address>
   </payment>

!@-商户帐户id-@!
!@-请求id-@!
购买
!@-申请金额-@!
!@-名字-@!
!@-姓-@!
!@-电子邮件-@!
!@-电话-@!
!@-街1-@!
!@-街道2-@!
!@-城市-@!
!@-国家-@!
!@-国家-@!
!@-邮政编码-@!
!@-账号-@!
!@-到期月份-@!
!@-到期年份-@!
!@-卡片类型-@!
!@-卡安全码-@!
!@-ip地址-@!
以下是从服务器返回的响应

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://sandbox-engine.thesolution.com/engine/rest/merchants/null/payments/null">
    <merchant-account-id ref="http://sandbox-engine.thesolution.com/engine/rest/config/merchants/null"/>
        <transaction-state>failed</transaction-state>
        <completion-time-stamp>2012-11-28T08:19:31.024Z</completion-time-stamp>
        <statuses>
            <status code="400.1018" description="The same Request Id for the Merchant Account is being tried a second time.  Please use another Request Id.  " severity="error"/>
            <status code="400.1009" description="The Transaction Type is invalid. Please check your input and try again." severity="error"/>
        </statuses>
        <requested-amount/>
        <api-id>elastic-api</api-id>
    </payment>

失败
2012-11-28 08:19:31.024Z
弹性api
我对请求头进行了两次交叉检查,每次都有唯一的请求id,即“hiren-”+GUID+DATETIMEWITHTIME

我甚至与网关的文档交叉检查了事务类型,它是有效的,但即使如此,它也给出了相同的错误

为了对url进行编码,我使用了以下代码 string sendString=“param=”+HttpUtility.UrlEncode(xmlData)

我认为上面的代码可能有错误,但它正在回复。。。 所以我们需要帮助来解决这个问题


请不要要求提供文档文件,但您可以要求提供额外信息。

您必须说明如何添加请求id和交易类型,以便任何人都能为您提供帮助。正如我在post请求id中所提到的,每次GUID为“hiren”+GUID+DateTimeWithTime,交易类型为“购买”,根据文档独特…让我困惑的是数据是url编码的,我认为API无法找到这些。。即使检查响应,您也可以看到写入的“null”不正确,它应该是我的商户id和请求id