Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to refund amount from Paypal to buyer which he/she already paid to seller, I am using Paypal's post method. Please suggest me any good link for refund from Paypal.

My code for sending Refund Request and my Method is RefundTransaction
C#
public void PostDataToPaypal(PaypalPayment paypal)

    {
        var remotePost = new RemotePost(PaypalResponseURL);
        remotePost.Amount = paypal.AssignmentAmount;
        remotePost.Add("cmd", "_xclick");
        remotePost.Add("business", PaypalMerchantBusinessAccount);
        remotePost.Add("amount", paypal.AssignmentAmount);
        remotePost.Add("item_name", string.Format("Assignment Amount for Assignment Id : {0}",paypal.AssignmentId));
        remotePost.Add("return", string.Format("{0}?tempCartId={1}", PaypalSuccessReturnUrl, paypal.AssignmentId));
        remotePost.Add("notify_url", string.Format("{0}?tempCartId={1}", PaypalNotifyUrl, paypal.AssignmentId));
        remotePost.Add("cancel_return", string.Format("{0}?assignmentId={1}", PaypalCancelUrl, paypal.AssignmentId));
        remotePost.Add("currency_code", PaypalCurrencyCode);
        remotePost.Add("transaction_id", paypal.TransactionId);
        remotePost.Add("refund_type", paypal.RefundType);
        remotePost.Post();
    }
Posted
Updated 9-Jan-13 2:24am
v2
Comments
ZurdoDev 9-Jan-13 8:24am    
Have you looked on paypal's developer site?
Saurabh Srivastava100 9-Jan-13 8:27am    
yes i have gone through Paypal Website but not able to understand the flow of refund transaction

1 solution

All you have to do is follow the instructions here[^] by translating those actions into the remotePost commands you are using right now.

I fear that google is not working for you: "Paypal Refund Transaction API" gave me this link right off the bat. https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_r_RefundTransaction[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 9-Jan-13 9:55am    
Useful, a 5.
—SA
fjdiewornncalwe 10-Jan-13 9:10am    
Thanks, Sergey
Saurabh Srivastava100 10-Jan-13 1:10am    
I want to do it through C# Code by using API of Paypal what you have suggested is manual work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900