Có hai cách để kiểm tra các nhà tài trợ đã quyên góp:
1) sử dụng "notify_url" tham số (an toàn)
2) sử dụng "trở lại" tham số (không an toàn)
Mã dụ:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business"
value="[email protected]">
<input type="hidden" name="bn" value="mbjtechnolabs_SP">
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Friends of the Park">
<input type="hidden" name="item_number" value="Fall Cleanup Campaign">
<input type="hidden" name="amount" value="25.00">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
Khi một số nhà tài trợ đóng góp tự động chuyển hướng đến url trả về nhưng tùy chọn này không an toàn vì có thể một số người trực tiếp mở url này.
cách tốt nhất để biết đóng góp của nhà tài trợ chọn thông số paypal notify_url.
PayPal sẽ gửi yêu cầu gửi tới notify_url.
Nguồn
2015-08-29 06:11:06
Vì vậy, về cơ bản tôi có thể chuyển biến ẩn với ID người dùng thành paypal. Sau đó, một khi người dùng tặng anh ta sẽ được chuyển hướng đến trang với biến ID người dùng và thông tin khác. Có phải đó là những gì bạn nói? – DanSpd
Không, nó phức tạp hơn một chút để thực sự an toàn. Bạn sẽ cần thiết lập tập lệnh thứ 2 nhận thông tin thanh toán từ Paypal. Kiểm tra trang này để biết chi tiết: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_html_paymentdatatransfer –