Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# PayPal
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
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 9-Jan-13 3:22am
Edited 9-Jan-13 3:24am
RyanDev142.5K
v2
Comments
ryanb31 at 9-Jan-13 8:24am
   
Have you looked on paypal's developer site?
Saurabh Srivastava100 at 9-Jan-13 8:27am
   
yes i have gone through Paypal Website but not able to understand the flow of refund transaction

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
v2
Comments
Sergey Alexandrovich Kryukov at 9-Jan-13 9:55am
   
Useful, a 5.
—SA
Marcus Kramer at 10-Jan-13 9:10am
   
Thanks, Sergey
Saurabh Srivastava100 at 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)

  Print Answers RSS
0 OriginalGriff 300
1 ProgramFOX 165
2 Peter Leow 130
3 Zoltán Zörgő 110
4 Maciej Los 80
0 OriginalGriff 300
1 ProgramFOX 165
2 Peter Leow 130
3 Sergey Alexandrovich Kryukov 85
4 Maciej Los 80


Advertise | Privacy | Mobile
Web01 | 2.8.150301.1 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100