tags:

views:

148

answers:

2

Hi all, I'be been at this for days and i cant seem to figure it out. All i want to do is when subscribe button is pushed, a variable is send ( post get i dont care ) payment is completed and landed on the success page, with my variable!

From what i can gather this should be able to do it:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="0000000">
<Input type="hidden" name="custom" value="<?php md5($code.microtime()); ?>"/>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_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>

Any help much appreciated ( and yes I've read paypal and sandbox documentation, just not that good at reading. )

A: 

Missing an echo. Instead of this:

<?php md5($code.microtime()); ?>

Try this:

<?php echo md5($code.microtime()); ?>
Matt Huggins
Will it pass it back throught $_POST['custom'] ??
Phil Jackson
Still no luck. nothing is sent.
Phil Jackson
A: 

PayPal will not process your custom data, so instead of sending it to them and getting it back, just store it in your own database. Associate the data with the transaction using invoice as the key.

In your landing page, you can get the invoice from PayPal transaction. Then you can fetch the data from your own database that referred by that invoice id.

Donny Kurnia