Jump to content

Archived

This topic is now archived and is closed to further replies.

searls03

Paypal Integration

Recommended Posts

I am using paypal to integrate a shopping cart into my site. I would like to know if anyone knows how paypal sends POST variables when there are multiple items. So my customer orders 2 items, I know how to get one item, but how does paypal send both? do they use an array? an item_name_1/2? how do they post back? does anyone here know?if you can help me, that would be awesome.

Share this post


Link to post
Share on other sites

so I do use item_name1/2/3/etc....but how can I dynamically create this list is my next question then.

Share this post


Link to post
Share on other sites

Without really knowing what you're doing, since you haven't really given any such information, a for loop perhaps?

for($i = 1; $i <= 5; $i++)
{
echo '<input type="hidden" name="item_name' . $i . '" />';
}

Share this post


Link to post
Share on other sites

I thought about a for loop, but the issue here being that how do I know what number to end on....there could be 1 item, there could be 100 items ordered. I plan to insert into a database each item that is sold individually for tracking purposes. So I guess I am asking, does paypal send a variable of how many items were purchased? I have been looking and can't seem to find one.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.