簡體   English   中英

PayPal捐贈與laravel 5.1集成

[英]PayPal donation integration with laravel 5.1

我已經在互聯網上搜索了有關此問題的信息,但仍然與之疊加。 我正在嘗試創建一個donation page ,他們可以在其中輸入所需的金額,然后將其重定向到paypal頁面/網站,並且可以正常工作。 但是我如何測試它是否起作用。 我已經創建了2沙箱貝寶帳戶,我認為該帳戶用於測試,但是每當嘗試使用sandbox account付款/登錄我的sandbox account ,我都無法使用它。 我要在登錄中使用的憑據似乎不存在。 這是為什么? 請在下面查看我的代碼以獲取代碼參考。 我該怎么辦?

碼:

<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>

更新:

我已將此<form method="POST" action="https://www.paypal.com/cgi-bin/webscr" role="form">更改為此<form method="POST" action="https://www.sandbox.paypal.com/cgi-bin/webscr" role="form">但交易完成后,它不會重定向到我的頁面,我認為應該是。

您應該添加一個“返回並取消”字段。

<input type="hidden" name="return" value="http://your-url-here.com">
<input type="hidden" name="cancel_return" value="http://your-url-here.com">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM