I'm following the steps from this answer Paypal checkout return data to redirect buyers automatically to the return URL like this (as you can see the rm option is set to 2)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="U74VBC2YUQS7E">
<input type="hidden" name="item_name" value="subscribe">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="RETURN URL FOR CONFIRMED PAYMENTS">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
now I'm trying to set Auto Return in paypal account to redirect the buyer automatically to the return URL but there's no "Website Payment Preferences" option.
Second question: how to send custom variables and fetch them again using the return url like username, password..... any data entered by the user before paying so I can grab all the data like this
$payer_email = $_POST['payer_email'];
$amount = $_POST['mc_gross'];
$payment_status= $_POST['payment_status'];
so if the status is Completed and the returned amount is equal to the form amount I can use the returned email, username and password to create a paid account on my site
$username = $_POST['username'];
$password = $_POST['password'];
My idea is to use custom field like this
<input type="hidden" name="custom" value="user=username&password=encrypted-user-pass-with-sha1">
but I guess it's wrong as mentioned here amount of non-hosted paypal buy now buttin is not changing
Sorry for this long post and Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…