1) Create a Pay Now Button. The first thing to do is create your pay now button. If you have a business account go to 'TOOLS. PAYPAL BUTTONS' FOPR NON BUSINESS ACCOUNTS Go to, Profile, My selling preferences then click UPDATE on PayPal Buttons. Then click Create New Button. PayPal, an online payment service, went public in 1999 and reached $1 billion in market value by 2002. Consumers recognize craigslist as an alternative to online auctions; they recognize PayPal as an alternative to checks, money orders and credit cards. It's easy to sell something on craigslist using PayPal.
Setting up the shopping cart in Allwebco templatesPaypal shopping cart setup. See the help.html included with your template download, it should indicate Paypal 'Type 2' forms near the top and include the correct support links and info in the cart setup section.See Instead…
Setting up 'Type 2' Paypal forms The designation 'Type 2' really only applies to Allwebco template Paypal forms. It indicates that the forms are generated in your Paypal account login. With the 1st version, standard forms, price and product details were embedded and edited directly in the HTML webpages. Both types are supported by Paypal and both work for website payments. Step 1: Confirm your form type: Check the top of your help.html to confirm you have Type 2 forms. Step 2: Setup account: Set up a PayPal merchant account. Step 3: Create a payment button: Login to your Paypal account. Go to: Tools > All Tools > Paypal Buttons > Create New Button Choose the 'shopping cart' in the 'Choose a button type' option and follow the directions in Paypal to create your button. See visual below. Enter the price and item name. The 'Customize Button' allows you to setup product ordering options, like sizes or colors (see next section). There is a 'return' page called 'thanks-payment.htm' included with your template. This is the Step 3: Customize advanced features (optional) tab in the Paypal create form area. Click the Take customer to a specific page (URL) after successful checkout: on, and enter the following link, replacing 'your-web-domain.com' with your website domain name: http://your-web-domain.com/thanks-payment.htm Step 4: Choose or add options: The template Paypal forms may, or may not, include options. One option may affect the price, and one may not. Choose what options to keep, or delete them to have no item options. Click visual for details: If the forms in your template HTML pages do not include options, still generate your options when you create your button code in your Paypal account and save the result code in a text file for later use. See: adding Paypal options. Step 5: Generate code: When you are done, click the 'Create Button' and you will see the following page: Copy this code from the box and paste it into a new plain text file. To do this, open Notepad and paste the code in the window. Keep this file open, you will need to copy some code from here for the next step. Step 6: Edit the template form: You will need only the 'hosted_button_id' code number in cases where you have included no ordering options. To edit a template form to include no options, click the following visual: To edit a template form and include options, click the following visual: ![]() Step 7: Test: Open the gallery or products page you have edited in your web browser. Test the form button to be sure everything is working. Generating Tip: Use the create similar button If you're generating a lot of similar products, here's a way to make the form generation go faster.
Shipping, sales tax and currency Options including shipping and sales tax are setup either while generating your forms as outlined above, or can be set in your Paypal business profile. See the following support pages:
The thanks-payment.htm page Every Allwebco template that includes a Paypal cart also includes a 'thanks-payment.htm'. This is called a 'return' page. Once a client sends a payment through your website, if you have properly setup this page as shown above, they will be returned to your website and to this page. Edit this thanks page with any info you would like. Note for cart templates with mobile sites: Both the full site and the mobile site include a 'thanks-payment.htm'. If you do not want to generate separate forms for the full and mobile sites you have 2 options. OPTION #1. Use the mobile 'thanks-payment.htm' page as the return page, include a link to the full site homepage on this page. OPTION #2. When generating your forms do not setup a return page and instead use the Paypal default return page. View cart buttons See the Paypal setup info on your template 'help.html' to edit the template 'view cart' buttons. View cart text link: Optionally use the following link code (edit with your e-mail) in the html pages for a view cart link. <a href='https://www.paypal.com/cart/business=[email protected]&display=1'>View Cart</a> Paypal saved buttons Once you generate a form, it is saved in your Paypal login in the 'saved buttons' area. You can modify these buttons later as needed. If you edit a button in your login, the 'hosted_button_id' in the HTML webpages will not change but your may need to update your webpages with new prices or options you changed. Notes & troubleshooting:
Links: PayPal Account Setup
hi guys iam a newbie to paypal. i got a sandbox test item onpaypal and created anitem Buy button which is embedded html code..now whenever i insert the html code in aspx page it dosen't redirect to the paypal site.Maybe because of the form tag that covers the html code..here is the code for paypal buy button for an item
Now an someone please help, i tried this code in plain HTML file and it worked but as soon as i put it in a form runat server tag on aspx it redirects page to itself.. thanks.
designerNProgrammerdesignerNProgrammer
1,57055 gold badges2929 silver badges4141 bronze badges
4 Answers
The problem is that ASP.NET pages define a form within which all the controls are placed (especially if you are using a master page) and HTML does not allow nested form tags.
There are several ways around this including using a normal ASP image button as described here.
You can also use an anchor link as described in this blog. However as noted by the author, the user can save the page source, edit it (e.g. change the price) and then reload it and click the link.
In fact any method that stores the information in the source of the webpage has potential to be abused. Therefore the approach I like, is to use a combination of an ASP image button and the anchor link approach but to implement this on the sever within the button click event:
1) In your ASP page define an image button where you want the PayPal button to go. You can set the ImageURL to the preferred button type provided by PayPal.
2) Use the Click event of the button to generate the required information on the server side and then redirect the browser to the PayPal site.
Disclaimer: It may still be possible for users to abuse this approach (although it is now a bit harder) so it is always best to check what has been paid before dispatching goods.
BenBen
2,30122 gold badges2727 silver badges3838 bronze badges
An ASPX page is like a giant HTML form. You need to close the ASPX form before the PayPal button code starts.
Like this:
You can also try creating the button as a URL and hyperlink to some text or an image on your site - you can still use the PayPal button image. When you're viewing the button code within PayPal there should be a tab above it labeled 'E-mail'. Click that and you'll get a URL - if you're creating buttons with a drop-down menu or text field you cannot turn the button into a URL.
GerzieGerzie
2,25011 gold badge88 silver badges1212 bronze badges
This is a hack way of doing it, but before the paypal code enter a closing form tag (This will close the asp pages form) then remove the closing form tag from the paypal code and allow the end of .net page end form tag to close the paypals form..
MikeMike
I did it using an iframe for each button
Here is the code inside PayPalButton.htm
Richard BriggsRichard Briggs
Not the answer you're looking for? Browse other questions tagged asp.netpaypal or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |