Results 1 to 56 of 56

Thread: Custom generated PayPal Button
      
   

  1. #1
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Custom generated PayPal Button

    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

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="you@yoursite.com">
    <input type="hidden" name="item_name" value="example description">
    <input type="hidden" name="item_number" value="">
    <input type="hidden" name="amount" value="10">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="return" value="http://www.yoursite.com/returnpage.php">
    <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/x-click-but02.gif" border="0" name="submit" alt="Make your payments with PayPal. It is free, secure, effective.">
    <img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">
    </form>
    Now, change these two lines as follows:


    <input type="hidden" name="item_name" value="<? echo $item_name; ?>">
    <input type="hidden" name="amount" value="<? echo $amount; ?>">
    Ok, add this code in the begining:

    <?
    if ($amount != 0){
    ?>
    and the following one at the end:

    <?
    }
    ?>
    At this point the entire button code will be:

    <?
    if ($amount != 0){
    ?>
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="you@yoursite.com">
    <input type="hidden" name="item_name" value="="<? echo $item_name; ?>">
    <input type="hidden" name="item_number" value="">
    <input type="hidden" name="amount" value="="<? echo $amount; ?>">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="return" value="http://www.yoursite.com/returnpage.php">
    <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/x-click-but02.gif" border="0" name="submit" alt="Make your payments with PayPal. It is free, secure, effective.">
    <img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">
    </form>
    <?
    }
    ?>
    Add a html box, more or less the same size as the button that you want to create, in your page, and paste the code in it. Place the html box where you want it to appear.

    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:

    <?
    $item_name = $_POST['item_name'];
    $amount = $_POST['amount'];
    ?>
    Now, set your page extension to be php when published, save, and publish.

    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. #2
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    Thanks Naval. Just another one of those treasures that you wont find anywhere else.

  3. #3
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    Does this work if I add the appropriate hidden fields and code to an encrypted button that I generate with PayPal?

  4. #4
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    sorry another question, can you make item_name required with ABVFP or will the name extension mess up the PayPal side of it?

  5. #5
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,294

    Default Re: Custom generated PayPal Button

    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. #6
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    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

  7. #7
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    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.

  8. #8
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,294

    Default Re: Custom generated PayPal Button

    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. #9
    Join Date
    Mar 2007
    Posts
    582

    Talking Re: Custom generated PayPal Button

    Quote Originally Posted by davidundalicia
    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.
    hehe yes i got it working, and it didn't find the return yet because I'm still building it. :p
    Thanks for watching out for me though.

  10. #10
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by aconstas1
    Does this work if I add the appropriate hidden fields and code to an encrypted button that I generate with PayPal?
    No, you need to use a NON encrypted button.

    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. #11
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by davidundalicia
    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......
    David, you are correct. But this is NOT intended for a downloadable product payment. Usually downloadable products have a fixed description and price. It is intended for a customized service payment, where the return page is simply a thank you page.

    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. #12
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,294

    Default Re: Custom generated PayPal Button

    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. #13
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,332

    Default Re: Custom generated PayPal Button

    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?

    <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but02.gif" border="0" name="submit" alt="Make your payments with PayPal. It is free, secure, effective.">
    or will it give a pop up error?

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

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

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  14. #14
    Join Date
    Mar 2007
    Posts
    582

    Default Re: Custom generated PayPal Button

    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.

  15. #15
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by Karen Mac
    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?



    or will it give a pop up error?

    Karen
    Hi KAren,

    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!


  16. #16
    Join Date
    Dec 2006
    Location
    Westren NY
    Posts
    207

    Default Re: Custom generated PayPal Button

    Hello,

    Can I get some help with this and a form I'm trying to connect it to please. the for url is www.windameer.com/feltitemsforsale.php .

    Thanks Jolen
    www.advertise.windameer.com - Add a Banner for your site or sites for free.

    www.windameersfleamarket4u.com - Buy Sell Trade with Windameer's Flea Market 4U ( 1 Year Free for BV sites)

    www.windameer.com - Come see our Angora Goats.


  17. #17
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by Windameer Farm
    Hello,

    Can I get some help with this and a form I'm trying to connect it to please. the for url is www.windameer.com/feltitemsforsale.php .

    Thanks Jolen
    Here is the procedure that you should have followed:

    The form submits. So your button should NOT have "Generate" but should have a label like "Calculate cost". Then, you should have a script, in the cost calculation page, that will receive the form details, email you the order details, calculate the cost, and, if the amount is >0, create the button code (which will also make the button visible). As it is now, it only submits to the "action.php" page, and then it doesn't do anything.
    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!


  18. #18
    Join Date
    Dec 2006
    Location
    Westren NY
    Posts
    207

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by navaldesign
    Here is the procedure that you should have followed:

    The form submits. So your button should NOT have "Generate" but should have a label like "Calculate cost". Then, you should have a script, in the cost calculation page, that will receive the form details, email you the order details, calculate the cost, and, if the amount is >0, create the button code (which will also make the button visible). As it is now, it only submits to the "action.php" page, and then it doesn't do anything.
    Thank you Navaldesign. I think this one is a bit over my head :). I'm goignt o put it on hold for now and finish the rest of the web pages. maybe by then i'll deside on what to do with this.

    Thank you for your help and i'm useing alot of your tips well rebuilding :)
    Jolen
    www.advertise.windameer.com - Add a Banner for your site or sites for free.

    www.windameersfleamarket4u.com - Buy Sell Trade with Windameer's Flea Market 4U ( 1 Year Free for BV sites)

    www.windameer.com - Come see our Angora Goats.


  19. #19
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    It is really very simple.
    You create a page that you will name "action" and publish as php. In the Start of Page (of the html code of the page) you will paste the same script that you will find in the Forms Tutorial Part 1. This will email the order details to you. Then, you will have a html box, with the code that will create the PayPal button.

    If you want, create this page, as you want it visually, and send me the .bvp file, i will place the code and send it back to you ready for publishing.
    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!


  20. #20
    Join Date
    Dec 2006
    Location
    Westren NY
    Posts
    207

    Default Re: Custom generated PayPal Button

    Ok I'll do that and send it to you thanks.
    www.advertise.windameer.com - Add a Banner for your site or sites for free.

    www.windameersfleamarket4u.com - Buy Sell Trade with Windameer's Flea Market 4U ( 1 Year Free for BV sites)

    www.windameer.com - Come see our Angora Goats.


  21. #21
    Join Date
    Dec 2006
    Location
    Westren NY
    Posts
    207

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by navaldesign
    It is really very simple.
    You create a page that you will name "action" and publish as php. In the Start of Page (of the html code of the page) you will paste the same script that you will find in the Forms Tutorial Part 1. This will email the order details to you. Then, you will have a html box, with the code that will create the PayPal button.

    If you want, create this page, as you want it visually, and send me the .bvp file, i will place the code and send it back to you ready for publishing.
    Thank you I made it and sent it to you threw you web site. sorry i sent the wrong one the frist time.
    www.advertise.windameer.com - Add a Banner for your site or sites for free.

    www.windameersfleamarket4u.com - Buy Sell Trade with Windameer's Flea Market 4U ( 1 Year Free for BV sites)

    www.windameer.com - Come see our Angora Goats.


  22. #22
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I did a form with check box choices which amount a customer can donate and I want to integrate the with paypal so they can pay using visa/mastercard if they click "make donation". To give you an idea what I am doing pls. go to
    http://www.millarefoundation.com/dform.html

    Thanks and I appreciate your help.

    janeth

  23. #23
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    There are some mistakes in your form:
    1. The page must be php and not html.
    2. The form has no action at all. The action should be the page itself: "dform.php"
    3. Encoding type: it is set to text / plain, must be multipart / form data
    4. You need Radio buttons, not checkboxes because only one ammount should be chosen.
    5. These radio buttons should have the same Group name (at the moment they are unnamed)
    6. You do NOT have the "If "statement so hat the button will only appear after a selection has been made.
    7. You did not define any item name, item value etc when creating the button. Also no return page. Did you create it in PayPal, or did you use BV's PayPal tool?
    8. You did not replace the item name and value (which do not exist) with the php code as per tutorial.
    Please read again and follow the instructions.
    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!


  24. #24
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Thank you for you reply. I redo and I'll be back. I had my paypal account already but I used the paypal in the BV that's why I don't know how can to link it.

  25. #25
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I'm back seeking help again, I used the radiobutton, now how can I pass the value selected to the paypal form. to complete the transaction. I know nothing about HTML.
    Thanks.

  26. #26
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    The radio button group name should be "amount" so the amount is passed to the script. If you do so, the value selected will be automatically be passed to the script. Just follow the initial instructions in post #1 in this same thread, replacing the text box with the radio buttons group.
    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!


  27. #27
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I'm back, still trying to finish my paypal form but I couldn't get it, if you have a few minutes kindly check www.millarefoundation.com/payment.php and point me where did I go wrong.

    Thanks and appreciate your effort.

  28. #28
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Your Radio buttons should have, as value, the amount corresponding to each one. They are null right now
    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!


  29. #29
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I'm back again, sorry for taking so long quite busy on everything, if you have spare time kindly check what I did and give you fine suggestion.
    Thanks and I really appreciate your help I learn a lot from you.

    I just have another question on HMTL though, how can I insert a line in between text.

    http://www.millarefoundation/payment.php

  30. #30
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Yes, your script works, though i would have added some code so that the visitor doesn't have to make two selections one for description and one for amount. However, these are personal choices. Good work.

    Not sure what you mean "insert a line in text". You mean a Fine Feed ? if that is the case, suppose you need to display the following text:

    This is line one

    This is line three because there is an empty line.

    The code is:

    <font style="font-size:13px" color="#000000" face="Verdana">This is line one<br>
    <br>
    This is line three because there is an empty line.</font>

    As you see the two <br> 's cause the CR from line one to line two and yet to line three.
    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!


  31. #31
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    Thanks, I though of that if a visitor chooses the a certain the description will be selected automatically but I don't know how to do it, second, how can I keep the button to a selected one.

    I do appreciate your help seems your are the guru. :))

    janeth

  32. #32
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by cct9105 View Post
    Hi Navaldesign,

    Thanks, I though of that if a visitor chooses the a certain the description will be selected automatically but I don't know how to do it, second, how can I keep the button to a selected one.

    I do appreciate your help seems your are the guru. :))

    janeth
    Depending on your form, the script has to be adapted. Have a look at this example: http://www.dbtechnosystems.com/Tips/radio_payment.php

    If you like it, contact me and i will send you the file.
    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!


  33. #33
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Thank you very much, Navaldesign, you are such a nice person, very helpful. I love to have a copy of what you did.

  34. #34
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Contact me through my form so i can email the file to you.
    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!


  35. #35
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I did fillout your form, iyour reply form is very nice,how did you make in table format. Thanks and I'll be happy if you can share it.

  36. #36
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    This is a bit complicated. It requires sending html email and hardcoding the mail content. I do that on a professional basis.
    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!


  37. #37
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Thanks a lot with code you sent though but have a fe problem, I cant go through my paypal account it always say incorect formatted amount item. I tried everything that I know but still do the same, maybe I missing sonething on the HTML I'm not sure. Kindly take a look again on your spare time pls.

    www.millarefoundation.com/payment.php

    for my prevous question: Yes, I agree with that it is a complicated one and I noticed also the one that you created on the payment.php is a hardcoded amount. I hope will learn more as I am venturing myself in website development.

    I really appreciate your willingness to help.

  38. #38
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Hi

    check your paypal button code. Also, you could change he settings in the form so that the radio buttons start from 1 instead of 0 . This way it will NOT default to the first choice as it does now. In that case make the first radio NOT selected
    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!


  39. #39
    Join Date
    Dec 2006
    Posts
    57

    Smile Re: Custom generated PayPal Button

    Hi Navaldesign,

    I finally finished my form, just a few error on the quotation part o the html, you are an angel in finishing this portion of the website.

    Thank you very much.

  40. #40
    Join Date
    Aug 2007
    Posts
    5

    Default Re: Custom generated PayPal Button

    My turn to ask for help with this button. Can you look at www.vacations-afloat.com/payments.html and tell me where i am going wrong. I can't figure out how to make the initial value work without displaying their values.

    Thanks for your anticipated help

    Michael

    michael@vacations-afloat.com

  41. #41
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    You have published the page as html. Please read the instructions, you need to publish it as php
    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!


  42. #42
    Join Date
    Aug 2007
    Posts
    5

    Default Re: Custom generated PayPal Button

    Thanks for that, the mistake was in the menu buttons which were pointing at an .html page and not the .php one.

    Next question, we sell vactaions and therefore each transaction is a different value, hence the need for your custom button. We also sell in 3 currencies, US Dollars, British Pounds and Euros, can I add the ability to select currency to the cutom buton? If so how do i do tis?

    Many thanks
    Michael

  43. #43
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    You can add in the form ALL the parameters of the PayPal button: amount, item descriptin, item nr., amount, currency, etc. The code has to be changed acordingly, and the form fields must reflect the code elements. So, change the button code to :

    Code:
    <?
    if ($amount != 0){
    ?> 
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="you@yoursite.com">
    <input type="hidden" name="item_name" value="="<? echo $_POST['item_name']; ?>">
    <input type="hidden" name="item_number" value="">
    <input type="hidden" name="amount" value="="<? echo $_POST['amount']'; ?>">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="return" value="http://www.yoursite.com/returnpage.php">
    <input type="hidden" name="currency_code" value="<? echo $_POST['currency'];?> ">
    <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/x-click-but02.gif" border="0" name="submit" alt="Make your payments with PayPal. It is free, secure, effective.">
    <img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">
    </form>
    <?
    }
    ?>
    and include, in the form, a drop down with the thre values : USD, GBP, EUR for the three currencies you need.
    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!


  44. #44
    Join Date
    Aug 2007
    Posts
    5

    Default Re: Custom generated PayPal Button

    I am obviously being very stupid about this i now get an error:
    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/xdqsufol/public_html/payments.php on line 280
    Might be easier if i paid you to do this for us

  45. #45
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Hi,

    this is entirely up to you. If you wish you can contact me privately.
    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!


  46. #46
    Join Date
    Sep 2007
    Location
    Ontario - Canada
    Posts
    8

    Default Re: Custom generated PayPal Button

    Quote Originally Posted by navaldesign View Post
    David, you are correct. But this is NOT intended for a downloadable product payment. Usually downloadable products have a fixed description and price. It is intended for a customized service payment, where the return page is simply a thank you page.

    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.
    Fair enough, but im wondering what the code-lines would be then for a single item download so there's no messing around with amount, just "yes I want to download that file"

  47. #47
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    I am not sure what you mean here. if you only want one item, at a fixed price, just create the correct PayPal button and add it in your sales page. The comment David had done, is that since you are using NON encrypted button code, this trick should NOT be used for downloadable products.

    There are a few ways to have protection for your download link. The best, in my opinion, is to have a script that will check the payment, with PayPal, and if the payment is ok, it will display the download link ( attention: NOT the file name, just the link). Otherwise it will display an appropriate error messaGE.

    I do have a script that allowes excactly this task: it is called IDC (Instant Download Cart) but it is a pro script and as such it is not free. If you are interested, you can contact me through my form.
    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!


  48. #48
    Join Date
    Mar 2008
    Location
    San Diego, CA
    Posts
    47

    Default Re: Custom generated PayPal Button

    I've been playing around with paypal buttons resently. and I founded very simple solution.
    1. log in to your paypal account
    2. select merchant tab
    3. you'll see a dozen of options for buttons/carts/customizations
    4. make selections and paypal will automatically generate html code for you
    5. copy and then paste it on your web page

  49. #49
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Hi,

    this is not to disappoint you, but this is not the subject of this thread. Creating the button code in the PayPal site is something well known to most users. It can also be done directly in BV. The question here is HOW the user will be able to modify the button properties (subcription and amount) directly on your webpage, when different services / prices are required.
    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!


  50. #50
    Join Date
    Mar 2008
    Location
    San Diego, CA
    Posts
    47

    Default Re: Custom generated PayPal Button

    sorry, my bad. I guess I missunderstood the point.
    sorry again

  51. #51
    Join Date
    Oct 2011
    Posts
    1

    Exclamation Re: Custom generated PayPal Button

    How safe is it to use Not encrypted buttons.
    Because here we are directly providing Merchant e-mail. If any one modifies the merchant email(business).
    Then amount will be transferred to others email instead of our account.
    Is there any other way to have textbox to provide custom amount by using Encrypted button(without providing Merchant e-mail).

    Thanks,
    Sandeep M.

  52. #52
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    You can always create buttons in PayPal site.

    However, the only risk you have is that your email address gets "caught" by spam bots so you will be receiving spam mails.

    There is no way a payment can be diverted from your account to another one, with buttons that are on YOUR website, even if they are not encrypted, unless they reproduce your own website and fraud customers by making them think that they are purchasing from you whilst, instead, they are purchasing (and paying) from a fraudelent website.
    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!


  53. #53
    Join Date
    Dec 2011
    Posts
    2

    Default Re: Custom generated PayPal Button

    Thanks for this very helpful article.I read another article (http://www.softcoded.com/paypal/paypal_php.php) where the payment.php page is invisible to the customer and submits itself automatically with javascript when it loads. The Paypal "Buy Now" button is on the first page (the "Generate" button in your example website). The customer is directed straight to Paypal via the invisible, automatic payment.php page, which sends the necessary information using the hidden input fields.Would this method be safe, do you think, for a website selling downloadable products?

  54. #54
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    Generally speaking selling downloadable products requires a "protection" 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!


  55. #55
    Join Date
    Dec 2011
    Posts
    2

    Default Re: Custom generated PayPal Button

    In your script above, you have,

    <input type="hidden" name="return" value="http://www.yoursite.com/returnpage.php">

    If I change this to

    <input type="hidden" name="return"
    value = "http://www.yoursite.com/returnpage.php?status=TRUE">
    <input type="hidden" name="cancel_return" value = "http://www.yoursite.com/returnpage.php?status=FALSE">


    do you think this would be a satisfactory protection script to verify whether payment has been made or not?

  56. #56
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: Custom generated PayPal Button

    No. The status is visible in the button code so where knows a bit more than the average user, will be able to reproduce it by simply typing it in the browser address bar.Please note that if you create encrypted buttons in PayPal's site, the return page is not visible. This might give you a minimum of security. However, the download itself is not secured, meaning that if anyone finds the download link and posts it on some interner hacker blog, everyone will be able to download your e-products.

    You would need to use a protection script that works with PayPal's IPN and protects the download by actually checking is a user is authorized to download.
    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!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •