简体   繁体   中英

Paypal sandbox - test payment

I am developing online store application with Laravel 4.2 + Knockoutjs and I want to make test payments with paypal. So I have created new Paypal Sandbox account. Then I login and go to Dashboard->Accounts where I created buyer and seller accounts: test-facilitator@gmail.com and test-buyer@gmail.com. Following this documentation https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/ this is my form:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
  <fieldset>
    <input id="buy" name="submit" type="submit" class="btn btn-primary" value="Buy" id="">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="test-facilitator@gmail.com">
    <input type="hidden" name="item_name" value="My online store">
    <input type="hidden" name="currency_code" value="EUR">
    <input type="hidden" name="amount" data-bind="value: amount"> 
    <input type="hidden" name="notify_url" value="my_notify_url">
    <input type="hidden" name="return" value="my_return_url">
    <input type="hidden" name="cancel_return" value="my_cancel_url">
 </fieldset>
</form>

So I am clicking the button, redirected to paypal and I am trying to login with my test-buyer@gmail.com with the password I have set in the sandbox account. And here is the problem - Paypal says that my credentials are wrong. How should I proceed my test payment, what am I doing wrong ?

The problem is that your form action is posting to https://www.paypal.com/ ....

Your action url should be https://www.sandbox.paypal.com/cgi-bin/webscr

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM