【发布时间】:2012-01-04 08:17:02
【问题描述】:
大家好,我的网站我想弄清楚如何制作一个自动化的贝宝商店,我的意思是当他们通过点击我网站上的贝宝按钮通过贝宝购买会员资格时,它也会改变里面的值该特定用户的我的数据库。
所以以时间线的方式:
- 用户点击购买按钮并购买商品。
- 付款完成后,重定向到我的更新用户会员状态的php脚本。
目前我需要帮助的是如何让它在付款完成后自动重定向。我遵循了一些代码,但它仍然没有工作,这是我正在使用的。
<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="MY EMAIL">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="return" value="MY URL TO REDIRECT TO">
<input type="hidden" name="item_name" value="Sponsored (1 Month)">
<input type="hidden" name="amount" value="0.01">
<input type="hidden" name="currency_code" value="NZD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
该代码将您留在 Paypal“付款完成”页面,但我希望它在付款完成时自动转到返回网址。
【问题讨论】:
-
由于某种原因,代码不会显示在 OP 中,我也无法编辑它,没有进行任何更改。所以这里是代码的 pastebin 链接:pastebin.com/ywWZGGpn
-
您必须将您的代码标记为代码,阅读帮助:stackoverflow.com/editing-help#code
-
我确实将其标记为代码,但我认为在此期间出了点问题。