![]() |
|
| |||||||
| Notices |
| BlueVoda Tips, Tricks and Shortcuts Know a great BlueVoda (or Web design) tip or trick? Share it with the world here. Become famous for your brilliance! Please, No Questions or Problems! |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||||||
| ||||||||
| Hi everyone, i have been recently asked by some members how you can create a custom generated PayPal Buy Now button. These buttons are extremely useful and are the basis of customized payments. Ok, let's see how you do this. We will suppose here that you want to create a button where amount and item description are user defined. The same technique can be used to customize any other parameter that a PayPal button allows for, as Currency, shipping etc. A working example can be seen in my own payments page, in http://www.dbtechnosystems.com/payment_general.php For this tutorial, we will asume that the page (which needs to be in php) is called "payment.php" Ok, lets see the steps one by one: 1. Creating the main button code: Go in your PayPal account, and create a button with the charatteristics you like. As we said, we will customize Item description and amount, so don't care about these two things, you can place there as amount "10" and as description: "example description". You will get a code like Quote:
Quote:
Quote:
Quote:
Quote:
Step 2. Create the form that will customize the button: this is a very simple form, with two fields: "amount", and "item_name". Please use exactly these names, as they are the same that PayPal uses. Add a submit button. Set the form action in "payment.php" so the page will submit to itself, the method to "POST", the encoding type to "multipart / form data". Double click the amount field and the initial value to be <? echo $amount; ?> Double click the item_name field and set the initial value to be <? echo $item_name; ?> Ok, the form part is finished. Step 3. Go to Page html, and paste the following code in the Start of page Tag: Quote:
That's all, have fun!! Warning: this trick asumes that you use a NON ENCRYPTED PayPal buy now button. Ad Davidindalicia has correctly stated in a post furher down, the code results clear to whoever views the source code. So, anyone can see the return page link. Conclusion: do NOT use this trick to generate a PayPal Button for downloadable products, unless you have a script that will verify the payment before allowing the download link(s) to appear in the return page. This trick is intended for customized payments, where the return page is simply a thank you page (you send the product yourself, either per email, if it is an electronic product, or phisically ship it, if it is a real product), or for those cases where the product is a downloadable one, but the download link is protected by a payment verification code as described above.
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#2
| ||||
| ||||
| Thanks Naval. Just another one of those treasures that you wont find anywhere else.
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#3
| ||||
| ||||
| Does this work if I add the appropriate hidden fields and code to an encrypted button that I generate with PayPal?
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#4
| ||||
| ||||
| sorry another question, can you make item_name required with ABVFP or will the name extension mess up the PayPal side of it?
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#5
| ||||
| ||||
| NavalDesign, Would it not be a good idea to advise anyone that uses this tip, that they will also need a method of confirming payment BEFORE directing the client to the actual download page? If members use this tip as it is, then the return page is visible after the paypal button has been generated and BEFORE the payment has been made...... |
|
#6
| ||||
| ||||
| The buttons i generate do not grab the correct item_name my field is correctly named and has the correct initial value my button html also has the correct code in the value What else could cause this? my payment php page is HERE
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#7
| ||||
| ||||
| I dont know what I did, but apparently where the fields appear in html versus the button has something to do with functionality. Also i had copied and pasted the amount code and just changed the item_number name which made my amount field be entered for the item_name during button generation. I had to delete the line in the HTML code in the button and retype the line for the item_name value without copying and pasting. I dont know why this would have effected the functionality of my form and button generation, but it did.
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#8
| ||||
| ||||
| Alex, when I tested your button it generated the button with the correct text in the item-name. But the return page could not be found...maybe you should check the spelling of your return link. |
|
#9
| ||||
| ||||
| Quote:
Thanks for watching out for me though.
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#10
| ||||
| ||||
| Quote:
Can you make the "item_name" required ? Yes, but a differents version would be needed, with a second page, which would check the amount and item name, and if the amount is not null, will chek the item name to see if it is null, and if yes, it will give an error message. If both are null, it will redirect to the same initial page. The button is correctly generated in your page.
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#11
| ||||
| ||||
| Quote:
However, you are correct, and i shall place the correct warning in my initial post. Thanks. You know my opinion on paid for downloads: no links, no risk. The thank you page (in my opinion) MUST have a payment verification script.
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#12
| ||||
| ||||
| As a method of paying for a service without a downloadable product, then once again your expertise and contribution is highly commendable and I shall use this myself..............Thanks George. |
|
#13
| ||||
| ||||
| When copy and pasting from other sources on the web like webpages or forums, its a good idea to to first copy into notepad, then recopy the notepad code to your actual application. Very often you pick up some erroneous code or figures that may or not be visible to you, but generally notepad will eliminate that. Alternately, could you not just make your own button and just change the URL to your .gif instead of the secured one at paypal? Quote:
Karen
__________________ KMAC Enterprise Granny's Country Nook 10%Off, your code: Forum Discounts Charming Noveltees~Sports Logos Charms, Jewelry, Collectibles- 10% off, your code: VodaHost ![]() |
|
#14
| ||||
| ||||
| I'm using this to allow my customers to pay me their monthly bills via web site instead of me having to go collect or them mail it in. Excellent addition to the web site.
__________________ Best Regards, Alex Surveillance Systems Restaurant POS | Retail POS Free WoW Gold Guide |
|
#15
| ||||
| ||||
| Quote:
yes, you can change the image source. No problem
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |