Abhishek Pandey
Abhishek Pandey

Reputation: 122

Adaptive Payment Partial Refund Functionality

I am sending the request like below and getting error in response. Please help me what I did wrong. Thanks .

My Request :-

requestEnvelope.errorLanguage=en_US
&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J
&receiverList.receiver(0)[email protected]
&receiverList.receiver(0).amount=14.00
¤cyCode=GBP

My Response :-

Array
(
    [responseEnvelope.timestamp] => 2017-02-24T05:50:55.589-08:00
    [responseEnvelope.ack] => Failure
    [responseEnvelope.correlationId] => 66bf1bad1aa91
    [responseEnvelope.build] => 30051544
    [error(0).errorId] => 589037
    [error(0).domain] => PLATFORM
    [error(0).subdomain] => Application
    [error(0).severity] => Error
    [error(0).category] => Application
    [error(0).message] => The refund's receiver [email protected] wasn't part of the payment request
    [error(0).parameter(0)] => [email protected]
)

Upvotes: 1

Views: 105

Answers (1)

Abhishek Pandey
Abhishek Pandey

Reputation: 122

I got a solution for this. In request We need to send receiver (seller) email not buyer email and it will automatically send refund to the appropriate receiver.

So the answer will be

requestEnvelope.errorLanguage=en_US
&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J
&receiverList.receiver(0)[email protected]
&receiverList.receiver(0).amount=14.00
¤cyCode=GBP

and we will get the responce like

Array
(
    [responseEnvelope.timestamp] => 2017-04-05T07:34:25.622-07:00
    [responseEnvelope.ack] => Success
    [responseEnvelope.correlationId] => 3a31df57541f3
    [responseEnvelope.build] => 31096492
    [currencyCode] => GBP
    [refundInfoList.refundInfo(0).receiver.amount] => 19.02
    [refundInfoList.refundInfo(0).receiver.email] => [email protected]
    [refundInfoList.refundInfo(0).refundStatus] => REFUNDED
    [refundInfoList.refundInfo(0).refundNetAmount] => 18.37
    [refundInfoList.refundInfo(0).refundFeeAmount] => 0.65
    [refundInfoList.refundInfo(0).refundGrossAmount] => 19.02
    [refundInfoList.refundInfo(0).totalOfAllRefunds] => 39.04
    [refundInfoList.refundInfo(0).refundHasBecomeFull] => false
    [refundInfoList.refundInfo(0).encryptedRefundTransactionId] => 00487139PD976194Y
    [refundInfoList.refundInfo(0).refundTransactionStatus] => COMPLETED
)

Upvotes: 1

Related Questions