Reputation: 1838
I've searched over the internet about this problem but still stack with it. I'm trying to create a donation page
, where they can enter the amount they want, then after that they will be redirected into the paypal
page/website, and works fine. But how can I test it if it is working or not. I've created 2
sandbox paypal account which I think it is for testing but whenever I try to pay/login my account using the sandbox account
, I can't use it. It seems that the credentials I'm trying to use in login doesn't exists. Why is that? Please see my code below for code reference. What should I do with this?
Code:
<form method="POST" action="https://www.paypal.com/cgi-bin/webscr" role="form">
<div class="form-group">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="KOWG3LKOLPR32">
<input type="hidden" name="amount" value="{{ $value }}" class="pure-number">
</div>
<div class="form-group">
<input type="submit" class="btn btn-info" value="Proceed to PayPal">
</div>
</form>
Update:
I've changed this <form method="POST" action="https://www.paypal.com/cgi-bin/webscr" role="form">
to this <form method="POST" action="https://www.sandbox.paypal.com/cgi-bin/webscr" role="form">
but after the transaction is done, it won't redirect to my page, I think it should be.
Upvotes: 0
Views: 858
Reputation: 447
you should add a return back and cancel field.
<input type="hidden" name="return" value="http://your-url-here.com">
<input type="hidden" name="cancel_return" value="http://your-url-here.com">
Upvotes: 1