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
https://forums.phpfreaks.com/topic/261180-very-minor-paypal-sandbox-problem/
Share on other sites

Archived

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

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