Jump to content

very minor paypal sandbox problem


davids_media

Recommended Posts

I have an Add To Cart button in my website so when a user adds an item to a paypal cart, it directs from webpage to test store as a variable is passed. Here is the code;

 

<p>
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="item_name" value="<?php echo $row['product']; ?>"> [quote]Works perfectly[/quote]
<input type="hidden" name="amount" value="<?php echo $row['price']; ?>">[quote]Works NOT SO perfectly[/quote]
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="hosted_button_id" value="7UCL9YCYYXL3J">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</p>

 

The "item_name" type passes variable value to test store perfectly. So if a user adds item "shoes" to cart, its passes that item fine. But it should also pass the appropriate product price too (e.g. £1.99) but it does not. How can I solve this please as my code looks fine except for that bit.

Link to comment
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.