【问题标题】:Paypal ManagePendingTransactionStatus method returning errorPaypal ManagePendingTransactionStatus 方法返回错误
【发布时间】:2014-07-17 20:58:24
【问题描述】:

我正在尝试使用 ManagePendingTransactionStatus 方法通过 PayPal 的经典 API (SOAP) 取消待处理的交易,但响应始终是内部错误。我已经尝试更改ActionDetailLevelVersion,并且我使用了各种(现有的)TransactionIDs,但没有任何效果。

有人经历过类似的事情吗?有没有我遗漏的配置?

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

网址: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>

【问题讨论】:

    标签: asp.net paypal paypal-sandbox


    【解决方案1】:

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

    【讨论】:

    • 不是沙盒环境中的“付款审核”功能吗?相当于FMF?如果没有,我该如何模拟 FMF 块?
    • 否,付款审核由 PayPal 发起,FMF 由您发起。查看以下页面:developer.paypal.com/webapps/developer/docs/classic/lifecycle/…。它讨论了允许您模拟错误的负面测试。
    • 嗨,凯文。据我了解,Negative Testing 模式使 PayPal 返回特定错误 - 因此,Ack 属性等于Failure。我真正需要的是接收SuccessWithWarningPaymentStatusPending。我可以通过“付款审查”功能实现这一点,但我真正想要完成的是通过 API 拒绝待处理的交易。有没有办法在沙盒环境中做到这一点?
    • 我对这个问题做了一些研究。可以将 FMF(高级欺诈过滤器)添加到 PayPal 沙盒帐户,但您似乎需要 PayPal 的某个人来启用它。我使用自己的一个沙盒帐户对此进行了测试,并且成功了。如果您希望将 FMF 添加到您的沙盒帐户之一,我的建议是向商家技术服务提交一张票并要求他们启用它。您需要向他们提供沙盒帐户的电子邮件地址。 www.paypal.com/mts
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-31
    • 2017-11-27
    • 2016-06-06
    • 1970-01-01
    • 2016-09-26
    • 2012-03-07
    相关资源
    最近更新 更多