Paypal ManagePendingTransactionStatus方法返回错误

时间:2014-05-28 14:51:06

标签: asp.net paypal paypal-sandbox

我正在尝试使用ManagePendingTransactionStatus方法通过PayPal的Classic API(SOAP)取消挂起的事务,但响应始终是内部错误。我已经尝试更改ActionDetailLevelVersion,并且我已经使用了各种(现有的)TransactionID,但没有任何效果。

有人通过类似的东西吗?是否有一些我缺少的配置?

我在我的ASP.NET WebForms(框架版本4.5)应用程序中使用沙盒环境,在我的Windows 7 x64上的本地主机中。以下是请求内容:

网址:https://api-3t.sandbox.paypal.com/2.0/

请求:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ns="urn:ebay:api:PayPalAPI">
    <soapenv:Header>
        <ns:RequesterCredentials>
            <ebl:Credentials>
                <ebl:Username>correct.username</ebl:Username>
                <ebl:Password>correct.password</ebl:Password>
                <ebl:Signature>Correct.Signature</ebl:Signature>
            </ebl:Credentials>
        </ns:RequesterCredentials>
    </soapenv:Header>
    <soapenv:Body>
        <ns:ManagePendingTransactionStatusReq>
            <ns:ManagePendingTransactionStatusRequest>
                <ebl:Version>104.0</ebl:Version>
                <ns:TransactionID>3B880366F0154954J</ns:TransactionID>
                <ns:Action>Deny</ns:Action>
            </ns:ManagePendingTransactionStatusRequest>
        </ns:ManagePendingTransactionStatusReq>
    </soapenv:Body>
</soapenv:Envelope>

响应:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI">
    <SOAP-ENV:Header>
        <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"></Security>
        <RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType">
            <Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType">
                <Username xsi:type="xs:string"></Username>
                <Password xsi:type="xs:string"></Password>
                <Signature xsi:type="xs:string"></Signature>
                <Subject xsi:type="xs:string"></Subject>
            </Credentials>
        </RequesterCredentials>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body id="_0">
        <ManagePendingTransactionStatusResponse xmlns="urn:ebay:api:PayPalAPI">
            <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2014-05-28T14:27:44Z</Timestamp>
            <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Failure</Ack>
            <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">1c49de851e39e</CorrelationID>
            <Errors xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:ErrorType">
                <ShortMessage xsi:type="xs:string">Internal Error</ShortMessage>
                <LongMessage xsi:type="xs:string">Internal Error</LongMessage>
                <ErrorCode xsi:type="xs:token">10001</ErrorCode>
                <SeverityCode xmlns="urn:ebay:apis:eBLBaseComponents">Error</SeverityCode>
            </Errors>
            <Version xmlns="urn:ebay:apis:eBLBaseComponents">104.0</Version>
            <Build xmlns="urn:ebay:apis:eBLBaseComponents">10958405</Build>
            <TransactionID xsi:type="xs:string">3B880366F0154954J</TransactionID>
            <Status xsi:type="xs:string">The Status of the transaction after running the your action (accept/deny) is:Unable To Determine</Status>
        </ManagePendingTransactionStatusResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

1 个答案:

答案 0 :(得分:0)

根据文档,ManagePendingTransactionStatus API操作接受或拒绝欺诈管理过滤器持有的待处理事务如果由于任何其他原因而等待,则操作可能会产生错误。