What im looking for my script to do is retrieve information, store it in a database and then use that information to automatically post to paypal (for a buy now button).
So what i currently have is the form:
Code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="my@email.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="item_number" value="999">
<input type="text" size="6" name="amount" value="5.00">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="http://example.com/payment_authorised.php">
<input type="hidden" name="cancel_return" value="http://example.com/payment_cancelled.php">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="custom" value="1,25,65,888">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynow_LG.gif:NonHosted">
<input type="hidden" name="notify_url" value="http://example.com/ipn.php">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"/>
</form>
What it does is replace the standard hidden input with a text input so a user can enter the value themselves. This is fine although I don't want the user to be able to enter a value below 2.00. I'm trying to do this without JavaScript so just pure php. I also have to customise the input "custom" based on the users input but that problem should be fixed with the same solution.
So what want to do is turn
[form] > [log information] > [display button] > [paypal]
into
[form] > [log information] -> [redirected to paypal]
Does anyone have any advice for this? I've browsed google but i either dont get the information im looking for or i similar peoples queries without a definite response or article.
Thanks.