locked
Paypal Integration With My Application?? RRS feed

  • Question

  • User9611005 posted

      Hi frnds......

           i referred this link to create account in paypal for testing purpose....

        

    http://www.hostknox.com/tutorials/miscellaneous/paypal-sandbox

    now i want to use this credentials into my application...

      plz any one suggest me some links or C# code to test the application...

     

    Wednesday, February 1, 2012 5:45 AM

All replies

  • User-424758792 posted

    Use this link to get account on paypal for testing purpose.

    https://developer.paypal.com/

    For paypal use guide please follow this links.

    https://www.paypalobjects.com/en_US/ebook/PP_Sandbox_UserGuide/test_user_setup.html

    https://www.paypal.com/cgi-bin/webscr?cmd=_ipn-test-about-outside

    https://developer.paypal.com/en_US/pdf/PP_Sandbox_UserGuide.pdf

    Wednesday, February 1, 2012 5:50 AM
  • User-1604169926 posted

    refer this paypal official links,

    https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code

    Wednesday, February 1, 2012 5:51 AM
  • User582086724 posted

    hi..

    Refer the below link.......

    http://www.codeproject.com/KB/aspnet/paypal_c_aspnet.aspx

    Wednesday, February 1, 2012 6:41 AM
  • User9611005 posted

    Hi frnds...


    I'm trying to test with Paypal Sandbox. I have the account with Paypal Sandbox set up, but I don't really get how to test my site. The products pages and prices are all created now. Is there a tutorial on this?

    Thursday, February 2, 2012 4:34 AM
  • User-1673382244 posted

    Hi

    Hi first flow the steps

    Papal Integration

    • Create PayPal sandbox account (https://developer.paypal.com)
    • Chose Test accounts
      • To simulate a transaction on PayPal.com, choose a test account.
    • To test a merchant transaction, you must use a test Business Account.
    • To test a buyer transaction, you must use a test Personal Account.

                   New test account: PreconfiguredCreate Manually

                  If we choose Preconfigured


    • Create one merchant account and buyer account.
    • Then login merchant account (https://www.sandbox.paypal.com/cgi-bin/webscr?)  
    • Next  choose My accountà profile
    • Next  choose selling preference  -> website payment preferences
    • We have change some payment preferences
    • First one is auto return for web payments
    • Auto Return shortens the checkout flow and immediately brings your buyers back to your website upon payment completion. To set up Auto Return, you need to turn it on and enter the return URL that will be used to redirect your buyers back to your site
    • Do we want auto return?
    • Change the radio button option auto return is on

      

           Auto Return:

    On
    Off

    • And give  auto return url into the textbox  for example(http://e-pstech.com/TBHLearn/PayPal/OrderCompleted.aspx)

     

    • Next  choose My accountà profile
    • Account Informationà Api Accessà Request API credentials
    • Select  Request API signature  By clicking Agree and Submit 

     

     

    For preconfigured shopping carts: Copy and paste the API username, password and signature into your shopping cart configuration or administration screen.


               
    string serverUrl = (config.Store.SandboxMode?
                   
    "https://www.sandbox.paypal.com/us/cgi-bin/webscr" :
                   
    "https://www.paypal.com/us/cgi-bin/webscr");
               
               
    string baseUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(
                   
    HttpContext.Current.Request.Url.PathAndQuery, "") + HttpContext.Current.Request.ApplicationPath;
               
    if (!baseUrl.EndsWith("/"))
                    baseUrl
    += "/";
               
               
    string notifyUrl = HttpUtility.UrlEncode(baseUrl + "Notify.aspx");
               
    string returnUrl = HttpUtility.UrlEncode(baseUrl + "OrderCompleted.aspx?ID=" + ID);
               
    string cancelUrl = HttpUtility.UrlEncode(baseUrl + "OrderCancelled.aspx");
               
    string business = HttpUtility.UrlEncode(config.Store.BusinessEmail);
               
    string itemName = HttpUtility.UrlEncode("Order #" + ID);

               
    StringBuilder url = new StringBuilder();
                url
    .AppendFormat(
                   
    "{0}?cmd=_xclick&upload=1&rm=2&no_shipping=1&no_note=1&currency_code={1}&business={2}&item_number={3}&custom={3}&item_name={4}&amount={5}&shipping={6}&notify_url={7}&return={8}&cancel_return={9}&USER={10}&PWD={11}&SIGNATURE{12}",
                   serverUrl
    ,config.Store.CurrencyCode, business, ID, itemName,
                   amount
    , shipping, notifyUrl, returnUrl, cancelUrl, config.Store.APIUsername, config.Store.APIPassword, config.Store.Signature);
           

    http://forums.asp.net/t/1721349.aspx/1

    http://indiandotnet.wordpress.com/2009/04/14/simplest-paypal-integration-with-aspnet-in-5-steps/ 

     

     

     

    Thursday, February 2, 2012 4:41 AM
  • User9611005 posted

    Hi abiruban...

      thanks for giving valuable info..

       let me know one thing ....what is meant by "Config.Store.SandBox"

    it's getting error stating that config.store.sandbox Does not exist,same as username,password,Signature also...

     plz elaborate me where i need to store all these info ..??

     

     

    Thursday, February 2, 2012 5:18 AM
  • User-1673382244 posted

    Hi,

    replace

    the Config.Store.SandBox line remove then you add "True" Then slove the prb....

    It means Paypal ha been tow modes 

    one is 'sandbox' another mode is 'live' mode

    sandbox mode is test mode so we can set the sandbox mode is true

    Thanks

    Thursday, February 2, 2012 5:46 AM
  • User9611005 posted

    Hi actually it is like this:

    string serverUrl = (config.Store.SandboxMode?
                   "https://www.sandbox.paypal.com/us/cgi-bin/webscr" :
                   "https://www.paypal.com/us/cgi-bin/webscr");
    
    What to do here??

    Thursday, February 2, 2012 5:49 AM
  • User-1673382244 posted

    HI

    try this

    string serverUrl = (true?
                   "https://www.sandbox.paypal.com/us/cgi-bin/webscr" :
                   "https://www.paypal.com/us/cgi-bin/webscr");

     

    Thursday, February 2, 2012 12:57 PM
  • User9611005 posted

    Hi abiruban...

       What u gave Upto Working fine....then how to send my details like visa card num,amount...etc to pay pal account and transfer amount from one account to another account..

       i have Two accounts one is Buyer account and Seller Account....with this two which account details should use and how to send request and response to paypay??

    Friday, February 3, 2012 12:12 AM
  • User9611005 posted

    Hi ..any one please help me...

          i strucked here....:)

    Friday, February 3, 2012 2:08 AM
  • User-1673382244 posted

    Hi 

    please refer the docoument

    https://skydrive.live.com/?cid=5FA7425A74B6099B&id=5FA7425A74B6099B%21121

    Thanks....

    Friday, February 3, 2012 2:46 AM
  • User9611005 posted

    Hi abiruban...thanks for ur reply.

    let me know one thing....

      "For preconfigured shopping carts: Copy and paste the API username, password and signature into your shopping cart configuration or administration screen."

    What does it mean??

    where i need to Past this code??

    Explain me how to store ???

    Friday, February 3, 2012 3:58 AM
  • User-1673382244 posted

    Hi,

    ApiUsername,password, and signature are configure into webconfig app setings

    for example

    <appSettings>
    <add key="ApiUsername" value="username"/>

    <add key="password" value="your sanbox password"/>

    <add key="signature " value="your sanbox signature  "/>

    </appSettings> 

      StringBuilder url = new StringBuilder();
                url
    .AppendFormat(
                   
    "{0}?cmd=_xclick&upload=1&rm=2&no_shipping=1&no_note=1&currency_code={1}&business={2}&item_number={3}&custom={3}&item_name={4}&amount={5}&shipping={6}&notify_url={7}&return={8}&cancel_return={9}&USER={10}&PWD={11}&SIGNATURE{12}",
                   serverUrl
    ,config.Store.CurrencyCode, business, ID, itemName,
                   amount
    , shipping, notifyUrl, returnUrl, cancelUrl,ConfigurationManager.AppSettings["ApiUsername"],ConfigurationManager.AppSettings["password"],ConfigurationManager.AppSettings["signature "]);
    thnaks..
    Friday, February 3, 2012 5:18 AM
  • User9611005 posted

    Hi abiruban once again thanks for ur help...

     Now its getting error saying that::

    the link you have used to enter the paypal system contains an incorrectly formatted item amount

    i tried in different ways but still its getting same error
    Friday, February 3, 2012 5:54 AM
  • User-1673382244 posted

    Hi


    your amount fromat must be like this 10.00

    http://www.pagedowntech.com/faq/faq.aspx?faqid=82

    Thanks....

    Friday, February 3, 2012 6:49 AM
  • User9611005 posted

    Hi abiruban...

       i already tried using double,int,string format.....But no use ???

    Friday, February 3, 2012 11:44 PM
  • User-1673382244 posted

    Hi,

     string amount = Convert.ToDecimal(Payment).ToString("N2").Replace(',','.');

    Try this way

    Saturday, February 4, 2012 12:18 AM
  • User9611005 posted

    Hi....

      No use abiruban...its getting value like 10.00 format only but when it redirects to pay pal getting same error

    Saturday, February 4, 2012 12:22 AM
  • User-1673382244 posted

    can you share your code

    Saturday, February 4, 2012 7:07 AM
  • User-1673382244 posted

    can you share your code

    Saturday, February 4, 2012 7:07 AM
  • User2130597707 posted

    Does this work the same as Website Payments Pro instead of Express check out as far as the sample codes? I am new to paypal integration, but my situation is I have to integration my website custom shopping card to Website payments Pro and I don't know where to start. Thank you very much for the post.

    Tuesday, February 7, 2012 3:10 PM