【问题标题】:Integrating Automated Paypal shop system?集成自动 Paypal 商店系统?
【发布时间】:2012-01-04 08:17:02
【问题描述】:

大家好,我的网站我想弄清楚如何制作一个自动化的贝宝商店,我的意思是当他们通过点击我网站上的贝宝按钮通过贝宝购买会员资格时,它也会改变里面的值该特定用户的我的数据库。

所以以时间线的方式:

  1. 用户点击购买按钮并购买商品。
  2. 付款完成后,重定向到我的更新用户会员状态的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
  • 我确实将其标记为代码,但我认为在此期间出了点问题。

标签: php paypal


【解决方案1】:

这不是贝宝的工作方式,您不能依赖访问者的返回,您使用贝宝的 IPN(即时付款通知)功能,阅读其文档以了解其工作原理。

Instant Payment Notification - PayPal

【讨论】:

    【解决方案2】:

    您的返回网址真的是“我要重定向到的网址”还是类似于“http://myURL.com/myPage.asp”?第一个显然行不通。

    【讨论】:

      猜你喜欢
      • 2014-04-06
      • 2020-10-25
      • 2011-12-20
      • 2012-01-05
      • 2011-08-31
      • 2020-12-02
      • 2020-11-27
      • 2016-07-12
      • 1970-01-01
      相关资源
      最近更新 更多