I have paypal sandbox test account. I want to create a 'buy Now' button. I am trying it with GWT. But its even not working with simple HTML form. It displays a 'Buy Now' button on HTML page and after clicking on it redirects to PayPal site. Where it ask to login to buy product but after that it goes on displaying message: The email address or password you have entered does not match our records. Please try again. I am using buyer user to purchase product. I am pretty sure about the username and password.
Providing here the simple HTML form which I am trying:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="payPalForm">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="no_note" value="1"><br>
<input type="hidden" name="business" value="sellr1_1252495907_biz@gmail.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynow_SM.gif:NonHosted">
<input type="hidden" name="variables" value="http://google.com">
<input type="hidden" name="cancel_return" value="http://google.com">
<input type="hidden" name="notify_url" value="http://google.com">
<input type="hidden" name="return" value="http://freelanceswitch.com/payment-complete /">
<input type="hidden" name="currency_code" value="USD">
<input name="item_name"开发者_开发技巧 type="hidden" value="Deal Name">
<input name="amount" type="hidden" value="500">
<input type="submit" name="Submit" value="Submit">
</form>
Please advice. Thank you.
As Lazarus has pointed out you are using the wrong address for your form action. You are posting to the live PayPal service - The sandbox is what it is, its a dev version of the live Paypal... why shouldn't the Sandbox environment ask you Credit Card details, how else would you test your check out process?
Obviously the sandbox environment uses dummy credit card numbers.
Anyway, I believe the address you need for your form action method is:
https://www.sandbox.paypal.com/cgi-bin/webscr
Your hidden fields look ok :)
Also please consider marking answers once you feel your questions have been answered - just click on the outline 'tick' for whichever answer you feel is best.
精彩评论