paypal沙箱退款交易没有出现

时间:2014-10-24 21:03:27

标签: .net api soap paypal paypal-sandbox

我正在尝试将paypal退款整合到我们的网络应用程序中。我们使用的是经典API的真正旧版本(v 2.3)。它正在为授权和捕获付款工作。这里有一些细节

  1. paypal classic API NPV
  2. 有一个用于测试的沙箱帐户
  3. 使用用户名,密码和签名进行授权和捕获付款。
  4. 在沙盒帐户中,付款状态始终处于暂挂状态,永远不会完成。 当我尝试使用全部或部分退款时,我会确认ACK =成功并使用核心ID。但没有任何内容出现在sanbox门户网站上。这是我用来退款的代码。

     'build the request string to process one paypal refund
                            pp = "&METHOD=RefundTransaction"
                            pp = pp & "&TRANSACTIONID=" & transactionId
                            pp = pp & "&REFUNDTYPE=PARTIAL"
                            pp = pp & "&AMT=" & Math.Round(amount, 2)
                            pp = pp & "&CURRENCYCODE=USD"
                            pp = pp & "&NOTE=Refund " & refundRow("Store") & "Order " & refundRow("OrderNo").ToString
    

    我收到回复,就是这样。

    回复内容:

    BUILD 13443xxx
    VERSION 2.3
    ACK Success
    TIMESTAMP 2014-10-23T16:44:36Z
    CORELATIONID exxxx7e2dxxxx
    

    我总是获得成功但是当我登录沙箱门户时没有任何显示。

    我也在现场测试了一些退款。它有完全相同的问题。

    任何输入?

    部分退款申请和回复

    请求

    <soapenv:Envelope  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" >
      <soapenv:Header>
        <ns:RequesterCredentials>
          <ebl:Credentials>
            <ebl:Username>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</ebl:Username>
            <ebl:Password>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</ebl:Password>
            <ebl:Signature>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</ebl:Signature>
          </ebl:Credentials>
        </ns:RequesterCredentials>
      </soapenv:Header>
      <soapenv:Body>
        <ns:RefundTransactionReq>
          <ns:RefundTransactionRequest>
            <ns:TransactionID>O-XXXXXXXXXXXXXXXXXXXXXXXXXXXX</ns:TransactionID>
            <ns:RefundType>Partial</ns:RefundType>
            <ns:Amount currencyID="USD">7</ns:Amount>
            <ebl:Version>94.0</ebl:Version>
          </ns:RefundTransactionRequest>
        </ns:RefundTransactionReq>
      </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">
        <RefundTransactionResponse xmlns="urn:ebay:api:PayPalAPI">
          <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2014-10-25T06:07:08Z</Timestamp>
          <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
          <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">45xxxxxxxxxxx</CorrelationID>
          <Version xmlns="urn:ebay:apis:eBLBaseComponents">94.0</Version>
          <Build xmlns="urn:ebay:apis:eBLBaseComponents">1xxxxx4</Build>
          <RefundTransactionID>
          </RefundTransactionID>
          <TotalRefundedAmount xsi:type="cc:BasicAmountType" currencyID="USD">-7.00</TotalRefundedAmount>
          <RefundInfo xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:RefundInfoType">
            <RefundStatus xsi:type="ebl:PaymentStatusCodeType">None</RefundStatus>
            <PendingReason xsi:type="ebl:PendingStatusCodeType">none</PendingReason>
          </RefundInfo>
        </RefundTransactionResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

1 个答案:

答案 0 :(得分:0)

好的,我可以在PayPal技术支持团队的帮助下解决这个问题。

基本上有两种类型的交易ID。我们称之为DoAuthorize时得到的,以及当我们称之为DoCapture时得到的另一个。所有退款都可以使用后者(DoCapture)交易ID。

帮助链接: https://developer.paypal.com/docs/classic/express-checkout/ht_ec-orderAuthPayment-curl-etc/

虽然我有答案,但是当我们使用DoAuthorize调用的事务ID调用RefundTransaction API时,我对我们得到的响应并不特别满意。我回归SUCCESS ?????并且还有一个共同关系id。但帐户中没有任何内容。

PayPal技术团队,如果您偶然发现这篇文章,请纠正问题或解释为什么有意义。

相关问题