Jump to content

Recommended Posts

Hi, I have got a serious problem while trying to integrate the paypal to my php code.

Here is the details-

 

In the attached image you can see that I have a form and I have to pass two price values for two different products which have got the same name, since paypal accepts one name at a time. I am not able to do that. Do you have any idea how to deal with this kind of situation.

 

The code is some thing like this -

If we click on forst ADD TO CART the following code will be executed and will be added to cart

 

<form  action="https://www.paypal.com/cgi-bin/webscr" method="post" id="pp">

<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

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

<input type="hidden" name="cmd" value="_cart">

<input type="hidden" name="business" value="">

<input type="hidden" name="item_name" value="Advo Banner">

<input type="hidden" name="item_number" value="EM-EAB">

<input type="hidden" name="amount" value="89.00">

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

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

<input type="hidden" name="cancel_return" value="http://www.abc.com">

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

<input type="hidden" name="currency_code" value="USD">

<input type="hidden" name="lc" value="US">

<input type="hidden" name="bn" value="PP-ShopCartBF">

 

</form>

 

And if we click to 2nd ADD TO CART the following code gets executed and the item will be added to cart-

<form  action="https://www.paypal.com/cgi-bin/webscr" method="post" id="pp">

 

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

<input type="hidden" name="cmd" value="_cart">

<input type="hidden" name="business" value="">

<input type="hidden" name="item_name" value="Advo Ad Creation">

<input type="hidden" name="item_number" value="EM-EAA">

<input type="hidden" name="amount" value="49.00">

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

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

<input type="hidden" name="cancel_return" value="http://www.abc.com">

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

<input type="hidden" name="currency_code" value="USD">

<input type="hidden" name="lc" value="US">

<input type="hidden" name="bn" value="PP-ShopCartBF">

</form>

 

I want to have only one ADD TO CART button and should add both at a time to the cart. Can you please help me out.

 

Thanks,

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/68451-paypal-problem-please-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.