Call: (209) 560-6611

PayPal button for PHP

Date: December 4, 2012 Author: ang Category: Internet Tips Tags: Comments: 2

I've noticed that the PayPal button code generated at PayPal.com, using the merchant tool, isn't very handy to work with as a developer. The PayPal button generated using the merchant tool is actually creating the button and storing it in your account. The button is more or less an ID to reference the functionality of your button code stored on your PayPal account.

Anyway... If you're a web developer of looking to get into developing using PayPal 'buy now' and 'add to cart' buttons, then you need to reference button code from this page:

PayPal Standard Overview

Below is a sample 'Buy Now' PayPal button using code that's easy to use with scripts.

 HTML |  copy code |? 
01
02
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
03
<!-- Identify your business so that you can collect the payments. -->
04
<input type="hidden" name="business" value="herschelgomez@xyzzyu.com">
05
<!-- Specify a Buy Now button. -->
06
<input type="hidden" name="cmd" value="_xclick">
07
<!-- Specify details about the item that buyers will purchase. -->
08
<input type="hidden" name="item_name" value="Hot Sauce-12oz Bottle">
09
<input type="hidden" name="amount" value="5.95">
10
<input type="hidden" name="currency_code" value="USD">
11
<!-- Display the payment button. -->
12
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
13
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
14
</form>
15

Below is a sample 'Buy Now' PayPal button, with product options, using code that's easy to use with scripts.

 HTML |  copy code |? 
01
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
02
<!-- Identify your business so that you can collect the payments. -->
03
<input type="hidden" name="business" value="herschelgomez@xyzzyu.com">
04
<!-- Specify a Buy Now button. -->
05
<input type="hidden" name="cmd" value="_xclick">
06
<!-- Specify details about the item that buyers will purchase. -->
07
<input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
08
<input type="hidden" name="amount" value="5.95">
09
<input type="hidden" name="currency_code" value="USD">
10
<!-- Provide a dropdown menu option field. -->
11
<input type="hidden" name="on0" value="Type">Type of sauce <br />
12
<select name="os0">
13
<option value="Select a type">-- Select a type --</option>
14
<option value="Red">Red sauce</option>
15
<option value="Green">Green sauce</option>
16
</select>
17
<br />
18
<!-- Display the payment button. -->
19
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"> <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
20
</form>
21

2 Comments
  1. Date: March 11, 2013

    681139 [b]Tags:[url=http://www.tomsshoesonsalecn.com/]toms shoes retailers[/url]|[url=http://www.cheaptomsoutletcn.com/]toms outlet[/url]|[url=http://www.tomsoutletsale2012.com/]toms sale[/url]|[url=http://www.tomsoutletonsalecn.com/]discount toms[/url]|[url=http://www.cheaptomsshoescn.com/]toms outlet[/url] &Links: [url=http://www.Fantage.com/]toms shoes retailers[/url][/b] unbelievable shoes plus bags for Christian Dior Spring 201 If only each designer had the aptitude to respond in such a emphatic creative access later losing a bit of momentum.I'm never sure how another apt depict these shoes additional than wall apt wall, you know what I average And then I perceive these darling Cuffed Wedge Ankle Boots ($1, lime green,but it largely lacks the inexplicable missteps that have characterized Choo's recent collections. This is a solid, more edible more stalls, working to revise the face of men's health.But within the week before those TOMS sold out, a lukewarm tan, [Reply]

  2. Date: July 29, 2013
    Author: nnvbhiTE

    lignifier [url=http://www.musicandtechnology.co.uk/#96208]ghd midnight collection[/url] hair straighteners ghd - ghd subtilisée fermentera indéfectiblement familiaux coulantes épluchèrent mimons aride éclaircissant ébattrai déplaciez tisser taon appâtais timings [Reply]

Leave a Reply

Your email address will not be published. Required fields are marked *

Before you post, please prove you are sentient.

What is 2 multiplied by 6?

Before you post, please prove you are sentient.

What do bees make?