Technical Discussion
  >> Web Design / HTML / Web hosting Forum


Register (or login) on our website and you will not see this ad.


These posts have been archived and can no longer be replied to or modified.
  Print Thread
Standard User deleted
(deleted) Sun 05-Dec-10 11:17:57
Print Post

Paypal Payments from Website Shop


[link to this post]
 
Hello, I'm looking at wanting to make payments a bit easier for a shopping area on a site I'm putting together.

There will be 6 customisable options on a product, example, one drop down list (only one selectable), three items with check boxes (up to 5 items from the list can be selected) and two with radio buttons (either or). I can code this fine and that's OK (well I hope so anyway smile).

The problem I have is how to deal with this when trying to send the order to Paypal for payment. If basic selection (ie one item without additional customisation) then I can send item description and item code across to paypal. Here's the code I use to send the info to paypal currently. The trouble is that I can't figure out how to get this code to send across my customised entries from the prosepctive purchaser.

Here's the paypal code I have

<div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="paypal username in here">
<input type="hidden" name="add" value="1">
<input type="hidden" name="item_name" value="item name goes in here">
<input type="hidden" name="item_number" value="product code in here">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="amount" value="40">
<input type="hidden" name="shopping_url" value="http://www.xxx.yyy/item1">
<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit20" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
</div>

Am I making sense and is this somethign i can do. I'm quite desperate to deal with this as am having quite a lot of problems at the moment with things not going as planned.

Thank you for checking and fingers crossed for some help.
Standard User ian72
(knowledge is power) Mon 06-Dec-10 10:47:43
Print Post

Re: Paypal Payments from Website Shop


[re: deleted] [link to this post]
 
Can you build the options into the text based item name? So that if you were ordering shoes you might end up with "Loafers, black, size 10, without tassles".

I assume it is only for the billing, the info is not actually used to control what is dispatched?
Standard User SamsonUK
(knowledge is power) Mon 06-Dec-10 14:11:20
Print Post

Re: Paypal Payments from Website Shop


[re: deleted] [link to this post]
 
Been a long time since I had much to do with PayPal, but had a quick look through the docs and I think option_index is what you need, I think you can have up to 10 options (if I'm understanding your post correctly!).

<input type="hidden" name="option_index" value="1">

<input type="hidden" name="option_select0" value="2x4">
<input type="hidden" name="option_amount0" value="3.95">

<input type="hidden" name="option_select1" value="3x5">
<input type="hidden" name="option_amount1" value="4.95">

etc.

HTH.

Edit: Have a look here for some code that uses option_index (about 2/3rds down the page).

Edited by SamsonUK (Mon 06-Dec-10 14:13:09)


Register (or login) on our website and you will not see this ad.

Standard User deleted
(deleted) Thu 09-Dec-10 00:31:17
Print Post

Re: Paypal Payments from Website Shop


[re: deleted] [link to this post]
 
Hope you've got this sorted.

If not, I can probably help you - have a fair bit of experience with PayPal - not recently, but then what you're trying to do has more to do with HTML form construction than with PayPal as such.

Might make more sense if I can see the underlying form source and what you're trying to do.

Feel free to post back/send a private message.
  Print Thread

Jump to