PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

Last post 05-14-2008 3:52 AM by emran834. 8 replies.

Sort Posts:

  • PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    10-20-2006, 10:32 PM
    • Loading...
    • dmitcha
    • Joined on 07-24-2006, 7:31 PM
    • Posts 43

    Hi, all - I'm a newbie who just spent all day today trying to add a single PayPal button to my site (built in VWD2005X Ed).  I am not using a starter kit and literally just wanted to add an encrypted Buy Now Button to my page.  Here's what I tried, and here's what WORKED.

    --------------------------------- 

    THE QUICKEST SOLUTION: 

    1) PayPal link (vs. a button) - This works great and quickly if you don't mind not having encryption:

    <a href=" https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=YourPaymentEmailAtPayPal&item_name=YourItemName&item_number=YourItemNumber&amount=PriceNoDollarSign">

    </a>

    plus, you can add the real PayPal button image as the hyperlink image by referencing the PayPal button URL provided in the form code PayPal created for your button (<IMG src="https://www.paypal.com, etc.">.  Voila - you have a button - just no encryption.

     My thanks to Ahmad at PayPal Merchant Tech support (http://www.pdncommunity.com/pdn/board/message?board.id=basicpayments&message.id=2477&jump=true#M2477)

    -------------------------------- 

    THE BEST SOLUTION (if your host security settings allow it):

    2) PayPal Developer modules - I downloaded these and the Buy Now Button worked beautifully locally. But as soon as I uploaded it to my Go Daddy-hosted site, I got an error page: "That assembly does not allow partially trusted callers."  If you don't get that error page, go with these; they are easy and fantastic.  You will need to download them, install them, add some code to your web.config (per instructions) open VWD and choose Website/Add Reference and check the new PayPal control listing, then go to Tools/Choose Toolbox Items and check the new PayPal controls, which will then populate the bottom of your toolbox.

    My thanks to PayPal for this comprehensive solution - I wish it had worked with my host! 

    Download PayPal's developer kits by logging in at www.paypal.com, then going to Merchant Services / PayPal Developer Network (near bottom of page) /  SDKs and Toolkits (left menu). The Developers’ Toolkits are enough for simple buttons, but there are Pro kits for payment on your site.

    ------------------------------- 

    THE SIMPLEST SOLUTION.

    3) For me, the perfect answer was IFRAMES.  Someone casually referenced it in a listing here (thanks - can't find you again in the long list of PayPal pleas!), but there was no explanation of how to do it.  So I went on a Google hunt!

    For any other newbies in need of a very easy solution to your trusted PayPal button on a .NET 2.0 page, all you do is:

    A) SAVE PAYPAL'S GENERATED BUTTON FORM AS AN INDEPENDENT HTML FILE IN YOUR VWD PROJECT. Name it, for example, paypalbutton.htm.

    - In your PayPal Form code, add target=_top to make sure PayPal opens in the full browser window, not inside of the IFRAME. You also could set target=_blank if you want PayPal to open in a new window.

    - Be sure to set the doc's body background color to transparent, just for aesthetics (CSS is best, body style='background-color: transparent' attribute works fine.)

    B) REFERENCE YOUR NEW PAYPAL HTML FILE IN AN IFRAME ON YOUR ASPX PAGE. Wherever you want the button to appear on the page, place your IFRAME code, indicating source=paypalbutton.htm (be directory specific, of course). You can set the height pretty small to fit the button, and set the width however long you need to be able to align the button left or right on your page.

    - Be sure to set the IFRAME for allowtransparency=true for aesthetics

    That's it! I found this through http://dotnetjunkies.com/WebLog/adambeal/archive/category/2695.aspx and fooled around with it until it was consistent in Netscape, IE and Firefox. Thanks, Adam.

    Hope this saves someone else a full day of trial and error!  Does anyone know of any security issues with this approach? dma

  • Re: PayPal Button SOLUTIONS!!!! - PayPal Controls

    10-21-2006, 1:41 PM
    • Loading...
    • dmitcha
    • Joined on 07-24-2006, 7:31 PM
    • Posts 43
    Re the wonderful PayPal Developer controls 
    You will need to download them, install them, add some code to your web.config (per instructions) open VWD and choose Website/Add Reference and check the new PayPal control listing, then go to Tools/Choose Toolbox Items and check the new PayPal controls, which will then populate the bottom of your toolbox.
    One more step!  You'll also need to upload the PayPal control dll file from your computer to your Web site's Bin folder.
  • Re: PayPal Button SOLUTIONS!!!! - PayPal Controls

    04-03-2007, 2:01 AM
    Thanks. I have been looking for this for a while
  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    05-10-2007, 4:27 PM
    • Loading...
    • arnoldizon
    • Joined on 08-28-2003, 12:11 PM
    • Posts 23

    Hi,

    This is exactly what I am looking for. I downloaded the Paypal dll  and add the Dll in my visual studio.

    Can you show me a sample code behind in VB.

     I appreciate your help.

    Thanks,

    Arnold

  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    09-10-2007, 11:19 PM
    • Loading...
    • rfurdzik
    • Joined on 07-01-2002, 6:32 PM
    • zikbay.com
    • Posts 1,652

    I can not find this API, can you send me the exact link? they offer some paid service...

    i have placed the form html code, but it does not work with Ajax... this is the code,which does not work with ajax:

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="myemail">
    <input type="hidden" name="item_name" value="Item name">
    <input type="hidden" name="item_number" value="Item ID">
    <input type="hidden" name="amount" value="12.00">
    <input type="hidden" name="buyer_credit_promo_code" value="">
    <input type="hidden" name="buyer_credit_product_category" value="">
    <input type="hidden" name="buyer_credit_shipping_method" value="">
    <input type="hidden" name="buyer_credit_user_address_change" value="">
    <input type="hidden" name="no_shipping" value="0">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="bn" value="PP-BuyNowBF">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>

     

    Rafal
    Zikbay.com - Free Classifieds
    (Search Over 5 mln jobs on Zikbay.com)


    DNN Direct
  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    03-04-2008, 2:39 PM
    • Loading...
    • fig007
    • Joined on 12-16-2007, 9:54 PM
    • Posts 10

    Dmitcha,

    Thank You!!!

    I think you saved me atleast a day or two!

     Fig

  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    04-15-2008, 9:55 PM
    • Loading...
    • jwize
    • Joined on 10-13-2005, 1:42 AM
    • Posts 32

    <script type="text/javascript">
    function moveDivOut()
    {
         var inner = document.getElementById('innerDiv');
         var outer = document.getElementById('outerDiv');
         var innerHtml = inner.innerHTML;
         inner.innerHTML = "";
         outer.innerHTML = innerHTML;
    }
    </script>
    ...<body onload="moveDivOut();">
    <div id="outerDiv"></div> <!-- Keep this div up here so the content doesn't shift down -->
    <!-- Server Form -->
    <form runat="server" id="form1">
    <div id="innerDiv">
        <!-- Create Buy Now buttons from an xml or database storage and bind them to a listview-->
       <!-- HTML forms listview and form code not included -->
    .....
        <form .....></form>  ...
        <form .....></form>  ...
        <form .....></form>  ...
        <form .....></form>  ...
    ......
    </div>
    </form>

    This is the easiest way to get the design time binding for buy now buttons.

  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    05-06-2008, 1:21 AM
    • Loading...
    • IrishChieft
    • Joined on 01-11-2007, 5:49 AM
    • Northern California
    • Posts 3

     These are all hacks. Here's the ASP.NET 2.0 solution to this problem:

     

    http://www.codersbarn.com/post/2008/03/Integrate-PayPal-Checkout-Button-with-ASPNET-20.aspx  

    Filed under: , , ,
  • Re: PayPal Button (Pay Pal Button ) SOLUTIONS!!!!

    05-14-2008, 3:52 AM
    • Loading...
    • emran834
    • Joined on 08-13-2007, 5:34 PM
    • Posts 8

    I found a very useful and perfect solution for PayPal Buttons. A server control which works with Medium trust level and very easy to use. IPN / PDT can be handled too like handling server side events.

    Here is the link : http://www.spicelogic.com/showProducts.aspx?productID=slAspNetPayPalControl

Page 1 of 1 (9 items)
Microsoft Communities
Page view counter