简体   繁体   English

贝宝沙盒退款交易未显示

[英]paypal sandbox refund transaction not showing up

I am trying to integrate paypal refund into our web application. 我正在尝试将Paypal退款集成到我们的Web应用程序中。 We are using a really old version of the classic API (v 2.3) . 我们使用的是经典API(v 2.3)的旧版本。 It is working for authorization and capture payment. 它正在为授权和捕获付款而工作。 here are some details 这是一些细节

  1. paypal classic API NPV 贝宝经典API NPV
  2. have a sandbox account for testing 有一个沙盒帐户进行测试
  3. authorization and capture payment goes through fie with username, password and signature. 授权和捕获付款通过使用用户名,密码和签名的文件进行。

On the sandbox account, the payment status is always pending and never moves to complete. 在沙盒帐户上,付款状态始终处于待处理状态,并且永远不会完成。 When i try to use full or partial refund, I do ACK = success and with a corelation id. 当我尝试使用全部或部分退款时,我会执行ACK =成功并带有相关编号。 but nothing shows up on the sanbox portal. 但sanbox门户上没有任何显示。 here's the code that i use to do the refund. 这是我用来退款的代码。

 '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

i get a response, and it is something like this. 我得到了回应,就是这样。

Response Content: 回应内容:

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

I always get success but nothing shows up when i logon to sandbox portal. 我总是获得成功,但是登录沙盒门户时却什么也没有显示。

I test couple of refunds on the live site as well. 我也在实时网站上测试了几笔退款。 It has exactly the same issue. 它有完全相同的问题。

Any inputs? 有输入吗?

Partial Refund Request and Response 部分退款要求和回应

Request 请求

<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>

Response 响应

<?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>

Ok I was able to resolve this issue with the help of PayPal technical support team. 好的,我能够在PayPal技术支持团队的帮助下解决此问题。

Basically there are 2 types of transaction ids. 基本上有两种交易ID。 One that we get when we call DoAuthorize and another that we get when we call DoCapture. 当我们调用DoAuthorize时得到一个,当我们调用DoCapture时得到一个。 All the refunds is possible with the latter (DoCapture) transaction Id. 使用后者(DoCapture)交易ID可以退款。

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

Though I have the answer I am not particularly happy with the response that we get when we call the RefundTransaction API with transaction Id from DoAuthorize call. 尽管我有答案,但我对通过DoAuthorize调用的事务ID调用RefundTransaction API时得到的响应并不满意。 I returns SUCCESS ????? 我返回成功????? and also with a co-relation id. 并带有关联ID。 but nothing shows up in the account. 但帐户中没有任何内容。

PayPal tech team, if you ever stumble upon this post, them please either correct the problem or explain why does it make sense. 贝宝(PayPal)技术团队,如果您偶然发现了这篇文章,请他们改正问题或解释为什么这样有意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM