dongshan3806 2013-03-20 17:06 采纳率: 0%
浏览 84

PayPal自适应付款退款问题

I'm trying to refund an adaptive payment chained payment totally to the sender, but I'm stuck. I'm using CodeIgniter and Andrew Angell's awesome library for adaptive payments.

The refund I want to make has details like this: (you can see the raw xml requests and responds below)

Array
(
    [Errors] => Array
        (
        )

    [Ack] => Success
    [Build] => 5472483
    [CorrelationID] => 4d31bf900a109
    [Timestamp] => 2013-03-20T09:45:02.585-07:00
    [ActionType] => PAY_PRIMARY
    [CancelURL] => http://my-cancel-url.com
    [CurrencyCode] => TRY
    [FeesPayer] => PRIMARYRECEIVER
    [FundingTypes] => Array
        (
        )

    [IPNNotificationURL] => 
    [Memo] => 
    [PayKey] => my-paykey
    [PaymentInfo] => Array
        (
            [PendingRefund] => false
            [RefundAmount] => 0.00
            [SenderTransactionID] => 
            [SenderTransactionStatus] => COMPLETED
            [TransactionID] => my-transaction-id
            [TransactionStatus] => COMPLETED
        )

    [PreapprovalKey] => 
    [ReturnURL] => http://success-url-area.com
    [ReverseAllParallelPaymentsOnError] => false
    [SenderEmail] => sender@email.com
    [Status] => INCOMPLETE
    [TrackingID] => 
    [Receiver] => Array
        (
            [Amount] => 5.00
            [Email] => receiver@email.com
            [InvoiceID] => 
            [PaymentType] => SERVICE
            [Primary] => true
        )

    [XMLRequest] => <?xml version="1.0" encoding="utf-8"?><PaymentDetailsRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><payKey xmlns="">my-paykey</payKey></PaymentDetailsRequest>
    [XMLResponse] => <?xml version='1.0' encoding='UTF-8'?><ns2:PaymentDetailsResponse xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T09:45:02.585-07:00</timestamp><ack>Success</ack><correlationId>4d31bf900a109</correlationId><build>5472483</build></responseEnvelope><cancelUrl>http://my-cancel-url.com</cancelUrl><currencyCode>TRY</currencyCode><paymentInfoList><paymentInfo><transactionId>my-transaction-id</transactionId><transactionStatus>COMPLETED</transactionStatus><receiver><amount>5.00</amount><email>receiver@email.com</email><primary>true</primary><paymentType>SERVICE</paymentType><accountId>7VYWTSCQKWPAL</accountId></receiver><refundedAmount>0.00</refundedAmount><pendingRefund>false</pendingRefund><senderTransactionId>7P642947V2872150G</senderTransactionId><senderTransactionStatus>COMPLETED</senderTransactionStatus></paymentInfo><paymentInfo><receiver><amount>4.60</amount><email>soulsmasher@gmail.com</email><primary>false</primary><paymentType>SERVICE</paymentType><accountId>7UZSWUVKCU4UW</accountId></receiver><refundedAmount>0.00</refundedAmount><pendingRefund>false</pendingRefund></paymentInfo></paymentInfoList><returnUrl>http://success-url-area.com</returnUrl><senderEmail>sender@email.com</senderEmail><status>INCOMPLETE</status><payKey>my-paykey</payKey><actionType>PAY_PRIMARY</actionType><feesPayer>PRIMARYRECEIVER</feesPayer><reverseAllParallelPaymentsOnError>false</reverseAllParallelPaymentsOnError><sender><email>sender@email.com</email><accountId>Y2BSLXZ8DQYY2</accountId><useCredentials>false</useCredentials></sender></ns2:PaymentDetailsResponse>
)

When I try to execute refund, providing paykey, transaction ID (which I got from the request above), and sender email (which will get refund) this error comes up (you can see the raw request and responses below):

Array
(
    [Errors] => Array
        (
            [0] => Array
                (
                    [Receiver] => 
                    [Category] => Application
                    [Domain] => PLATFORM
                    [ErrorID] => 589061
                    [ExceptionID] => 
                    [Message] => The receiver sender@email.com is invalid for this refund
                    [Parameter] => sender@email.com
                    [Severity] => Error
                    [Subdomain] => Application
                )

        )

    [Ack] => Failure
    [Build] => 5472483
    [CorrelationID] => 2a1630b772ee0
    [Timestamp] => 2013-03-20T09:52:10.986-07:00
    [EncryptedTransactionID] => 
    [RefundFeeAmount] => 
    [RefundGrossAmount] => 
    [RefundHasBecomeFull] => 
    [RefundNetAmount] => 
    [RefundStatus] => 
    [RefundTransactionStatus] => 
    [TotalOfAllRefunds] => 
    [Receiver] => Array
        (
            [Amount] => 
            [Email] => 
            [InvoiceID] => 
            [PaymentType] => 
            [Primary] => 
        )

    [RawRequest] => <?xml version="1.0" encoding="utf-8"?><RefundRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><currencyCode>TRY</currencyCode><payKey xmlns="">my-paykey</payKey><receiverList xmlns=""><receiver xmlns=""><amount xmlns="">1.00</amount><email xmlns="">sender@email.com</email><paymentType xmlns="">SERVICE</paymentType></receiver></receiverList><transactionId xmlns="">1VL98806A27476639</transactionId></RefundRequest>
    [RawResponse] => <?xml version='1.0' encoding='UTF-8'?><ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T09:52:10.986-07:00</timestamp><ack>Failure</ack><correlationId>2a1630b772ee0</correlationId><build>5472483</build></responseEnvelope><error><errorId>589061</errorId><domain>PLATFORM</domain><subdomain>Application</subdomain><severity>Error</severity><category>Application</category><message>The receiver sender@email.com is invalid for this refund</message><parameter>sender@email.com</parameter></error></ns3:FaultMessage>
)
1

Also when I don't provide transaction ID and leave the rest to PayPal, the issue changes to this (raw XML request are below the array):

Array
(
    [Errors] => Array
        (
            [0] => Array
                (
                    [Receiver] => 
                    [Category] => Application
                    [Domain] => PLATFORM
                    [ErrorID] => 589036
                    [ExceptionID] => 
                    [Message] => The currency code is missing or doesn't match the code in the payment request
                    [Parameter] => 
                    [Severity] => Error
                    [Subdomain] => Application
                )

        )

    [Ack] => Failure
    [Build] => 5472483
    [CorrelationID] => e3fc5e41040f3
    [Timestamp] => 2013-03-20T10:02:29.233-07:00
    [EncryptedTransactionID] => 
    [RefundFeeAmount] => 
    [RefundGrossAmount] => 
    [RefundHasBecomeFull] => 
    [RefundNetAmount] => 
    [RefundStatus] => 
    [RefundTransactionStatus] => 
    [TotalOfAllRefunds] => 
    [Receiver] => Array
        (
            [Amount] => 
            [Email] => 
            [InvoiceID] => 
            [PaymentType] => 
            [Primary] => 
        )

    [RawRequest] => <?xml version="1.0" encoding="utf-8"?><RefundRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><currencyCode>TRY</currencyCode><payKey xmlns="">AP-52A99028X8685964M</payKey><receiverList xmlns=""><receiver xmlns=""><amount xmlns="">1.00</amount><email xmlns="">sender@email.com</email><paymentType xmlns="">SERVICE</paymentType></receiver></receiverList></RefundRequest>
    [RawResponse] => <?xml version='1.0' encoding='UTF-8'?><ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T10:02:29.233-07:00</timestamp><ack>Failure</ack><correlationId>e3fc5e41040f3</correlationId><build>5472483</build></responseEnvelope><error><errorId>589036</errorId><domain>PLATFORM</domain><subdomain>Application</subdomain><severity>Error</severity><category>Application</category><message>The currency code is missing or doesn't match the code in the payment request</message></error></ns3:FaultMessage>
)
1

As you can see, I've already provided the CurrencyCode, also the sender's email adress is taken from the request itself to prevent typos. Even if I hardcode it doesn't change the situation.

Can you help me, what am I missing?

Thanks,

  • 写回答

1条回答 默认 最新

  • doudengshen5591 2013-09-23 05:51
    关注

    check the documentation say by paypal here

    Turkish Lira     TRY
    
    NOTE:This currency is supported as a payment currency and a currency balance for in-country PayPal accounts only.
    
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看