You must Sign In to post a response.
  • Category: ASP.NET

    How to integrate PayPal in .net applications?

    Hi,

    I would like to know about what is "PayPal"?

    Till now i didn't develop .net application with PayPal.

    So how to integrate PayPal in .net applications?

    Can any one explain with sample example?
  • #681902
    Paypal is better payment for asp.net websites. it is used to bridge between merchant and customer. First of all you need create one paypal account to implement that payment gateway in your website.

    Initally you can use sandbox account create paypal sandbox account here (its for development use)

    https://developer.paypal.com/

    After create sandbox account inside create two account one for bussiness account (for sale merchant account) and another one for personal account (for buy customer account).

    Try like below code to make payment use paypal


    protected void Button1_Click(object sender, EventArgs e)
    {
    string redirecturl = "";
    //Mention URL to redirect content to paypal site for testing i send to sandbox account
    redirecturl += "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString(); //mention here your paypal business id

    //First name i assign static based on login details assign this value
    redirecturl += "&first_name=ravindran";

    //City i assign static based on login user detail you change this value
    redirecturl += "&city=trichy";

    //State i assign static based on login user detail you change this value
    redirecturl += "&state=tamilnadu";

    //Product Name
    redirecturl += "&item_name=" + "Horlicks";

    //Product Amount in dollor
    redirecturl += "&amount=" + "4";

    //Shipping charges if any
    redirecturl += "&shipping=5";

    //Handling charges if any
    redirecturl += "&handling=5";

    //Tax amount if any
    redirecturl += "&tax=5";

    //Add quatity i added one only statically
    redirecturl += "&quantity=1";

    //Currency code
    redirecturl += "¤cy=USD";

    //Success return page url
    redirecturl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();

    //Failed return page url
    redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();

    Response.Redirect(redirecturl);
    }


    For more detail and code snippet example refer my two PayPal Resource

    http://www.dotnetspider.com/resources/44018-How-integrate-PayPal-ASP.NET-using-cart-option.aspx

    http://www.dotnetspider.com/resources/43962-How-integrate-PayPal-ASP.NET.aspx

    Regards
    N.Ravindran
    Your Hard work never fails

  • #681943
    Hi Ravindran,

    Thanks you very much for your information.Now i got some idea about PayPal & PayPal integration in Asp.Net.

    Thanks & Regards
    D.Bulli Guruvu Setty


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.