Form Redirects to PayPal
The buyer fills in a form and, instead of a regular submit button, they click the PayPal button. The form information goes to you and the buyer goes to PayPal to arrange payment.
Submit the form to Master Form V4, as usual, so Master Form V4 could send the email and store the data on the server. The redirect URL, however, was a PayPal payment URL instead of a URL to a thank-you page.
It works a treat.
If you have a similar requirement, I'll show you how to do it. Perhaps you need contact or other information before the buyer is sent to PayPal:
-
To make the product ready for pickup when the customer gets back from PayPal.
-
If they have problems getting back to your site (which can happen if they pay by credit card and don't click the "return to merchant" link), you have their contact information to make things right.
-
If they abandon the payment page, you can get in touch with them to find out why.
Here's an example:
Implementation Overview
To implement this, you'll need form software that will handle an absolute http://... redirect URL (such as Master Form V4):
-
Change the redirect URL to a PayPal buy-now URL.
-
Change the submit button to type="image" with the PayPal image URL.
The step-by-step instructions that follow include how to obtain the PayPal buy-now and image URLs.
Step-by-step Implementation Instructions
Below is the code for a representation of the example form above.
<form method="post" action="FORM-SOFTWARE-URL" enctype="multipart/form-data"> <input type="hidden" name="redirect" value="PAYPAL-BUYNOW-URL"> <table border="0" cellpadding="3" cellspacing="0" style="margin:0 auto;"> <tr> <td>Name</td> <td><input type="text" name="name" style="width:200px;"></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" style="width:200px;"></td> </tr> <tr> <td>Phone</td> <td><input type="text" name="phone" style="width:200px;"></td> </tr> <tr> <td> </td> <td style="text-align:center;"> <input type="image" src="PAYPAL-IMAGE-URL"> </td> </tr> </table> </form>
The above form can be modified to suit your purposes or used as a guide for updating your own form.
Only three things are required, the form software URL, the PayPal buy-now URL, and the PayPal image URL:
-
The URL to the software to handle form submission —
The software you're using and where it's installed will determine what the URL is.
Replace FORM-SOFTWARE-URL in the form code above with the URL to the software.
If you don't have form handling software yet, get Master Form V4. It comes with free professional installation.
-
The PayPal button image URL —
Make a buy-now button at PayPal for the item name, item ID, and purchase amount of what is being sold.
When you get to the page with the code, verify you're at the "Website" tab of the code box. On the right, you'll see a "Buyer's View" area with an image. Obtain the URL of that image.
Replace PAYPAL-IMAGE-URL in the form code above with the image's URL.
How you get the image URL depends on your browser. It should have a way to copy an image URL within the right-click menu. Perhaps you'll need to "view image" and then copy its URL from the browser.
Example URL:
https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif
-
The PayPal buy-now URL —
At the same page as the previous step, click on the "Email" tab of the code box. There, you'll find the buy-now URL.
Replace PAYPAL-BUYNOW-URL in the form code above with at URL.
Example URL:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=38SM7VAXYJQ9W
There you go, three things to do and you have a form that submits to form handling software installed on your domain and then redirects the buyer to PayPal to arrange for the purchase.
It works just like expected of a normal form, except for one thing: The form's redirect is a PayPal buy-now URL instead of a thank-you page URL.
(This article first appeared in Possibilities ezine.)
Will Bontrager