Available variables
Business your PayPal account's email address
Quantity of quantity items. If the value is greater than 1, it is multiplied by the amount.
Item_name item name (or shopping cart name ). It must be letters, numbers, and a maximum of 127 characters.
Item_number is an optional variable used to track payments. It must be letters, numbers, and a maximum of 127 characters.
Amount item price (total price of all items in the shopping cart)
Shipping the shipping cost of this item
Shipping2 shipping costs for each additional item
Handling fee
Tax is based on the transaction tax amount. If this variable is used, the pass value will overwrite all user information tax settings (regardless of the buyer's location ).
No_shipping: the shipping address. If it is set to "1", your customer is not required to provide the shipping address. This variable is optional. if it is omitted or set to "0", you are prompted to enter the shipping address.
The available cn tags are displayed on the prompt bar (up to 40 characters)
No_note indicates the payment addition prompt. If it is set to "1", no prompt is displayed for your customer. This variable is optional. if it is omitted or set to "0", you are prompted to enter a prompt.
The name of the first option column of on0. Up to 64 characters
The first option value of os0. It can contain a maximum of 200 characters. "On0" must be defined to identify "os0 ".
The name of the second option column of on1. Up to 64 characters
The second set of os1 option values. It can contain a maximum of 200 characters. "On1" must be defined to identify "os1 ".
Custom will never forward optional variables to your customers. Can be used to track inventory
Invoice will never forward optional variables to your customers. Used to track bill numbers
Notify_url is only used with IPN. Internet URL for sending IPN Form Post
Return the Internet URL that will be returned after your customer completes the payment
Cancel_return the Internet URL returned after your customer cancels the payment
Image_url: Internet URL of the image to be mapped. The image size is 150X50 pixels.
Cs sets the background color of your payment page. If it is set to "1", the background color is black. This variable is optional. if it is omitted or set to "0", the background color is white.
Extended variable
PayPal allows you to paste extension variables if the following "cmd" value is changed:
To:
You can also use the following variables to modify the "cmd" value:
Extended variable
Email customer's email address
The customer name of first_name. It must be letters, numbers, and a maximum of 32 characters.
Last_name. It must be letters, numbers, and a maximum of 64 characters.
Address1 the country or region where the customer address is located. It must be letters, numbers, and a maximum of 100 characters.
The second line of address2 customer address. It must be letters, numbers, and a maximum of 100 characters.
City: the city where the customer address is located. It must be letters, numbers, and a maximum of 100 characters.
State the state where the customer address is located. Must be a formal 2-letter abbreviation
Zip client address zip code
The area code of the customer's overnight contact phone number
The first three customer phone numbers at night
Day_phone_a area code of the customer's daytime contact phone number
Day_phone_ B the first three telephone numbers of the customer during the day
Tip: to change the default shipping and service fee settings in "user information", go to your user information and edit your shipping calculation, then click the "allow use of trade-based freight" check box.
Pass a single item to PayPal
If your third-party shopping cart can be set to deliver a single item to PayPal, information about the item will be included in the buyer and seller's log and system notification. To add the information of this item, you must paste the HTML elements into the new version of the PayPal shopping cart process. This process is similar to Section #1 "transferring the total number of shopping carts to PayPal", with the following differences:
Set the "cmd" variable to "_ cart"
Change necessary HTML lines
And
Add a new variable called "upload"
In <表格> And add the following lines between labels:
Define item details
For the following specific item parameters, define a set of new values corresponding to each item purchased through the shopping cart of your partner. Append "_ x" to the variable name, where x is the item number. from 1, add one for each added item.
Item_name_x (item # x required) name of item # x in the shopping cart. It must be letters, numbers, and a maximum of 127 characters.
Item_number_x: optional variable associated with Item # x in the shopping cart. It must be letters, numbers, and a maximum of 127 characters.
Amount_x (item # x required) item # price of x
Shipping_x shipping item # Cost of x first (quantity 1)
Shipping2_x each additional shipping item # x (quantity 2 or more) shipping costs
Handling_x item # x processing cost
The name of the first option column of on0_x item # x. Up to 64 characters
Os0_x item # The first option value of x. It can contain a maximum of 200 characters ." On0_x "must be defined to identify" os0_x ".
The second option column name of on1_x item # x. Up to 64 characters
Os1_x item # The second option value of x. It can contain a maximum of 200 characters ." On1_x "must be defined to identify" os1_x ".
Repeat this setting for each item in the shopping cart
Add a set of required variables and any option variables to each item in your buyer's shopping cart in the above table. The first item in the shopping cart must be defined by the parameter ending with "_ 1", such as "item_name_1" and "amount_1. Similarly, the second item is named by the application variables "item_name_2" and "amount_2. Tip: The "_ x" value must increase in order to identify it. If you jump from item #1 to item #3 without defining item #2, the third item is ignored.
To specify the currency: All currency variables (amount, freight, freight 2, service fee, and tax) will be displayed in the currency specified by the "currency_code" variable pasted on the payment. Because it is not different from the item, you do not need to append "_ x" to the variable name ". If the "currency_code" variable is not pasted, we assume that the values of all currency variables are USD.
The above is the main procedure of using PHP to develop the PayPal payment interface.