【问题标题】:Paypal IPN response not getting into Android Mobile BrowserPaypal IPN 响应未进入 Android 移动浏览器
【发布时间】:2015-12-13 22:20:32
【问题描述】:

我是 Paypal 集成的新手,我正在尝试为我的 android 应用程序实施 Paypal IPN。为了使它工作,我创建了一个网页(使用 PHP 并发送到 Paypal 沙箱帐户,方法 (GET) ),我正在付款。我正在从中获取付款状态。

实际上,此网页正常运行,并在向计算机浏览器付款后得到响应,但如果我使用 Android 移动浏览器进行付款,那么我没有收到任何来自 Paypal 的付款响应。

我正在使用这个网址 IPN

这是我的 HTML 代码。

      <form name="payment_form" id="payment_form" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="GET" onSubmit="return form_submit();">
      <input type="text" name="amount"  id="amount" value="1" readonly class="form-control left-icon">
      <input type="hidden" readonly name="cmd" value="_xclick">
      <input type="hidden" readonly  name="business" value="Bmlpatel@gmail.com">
      <input type="hidden" readonly name="item_name" value="TEST Store">
      <input type="hidden" readonly name="LC" value="AL"> 
      <input type="hidden" readonly name="country" value="USA">
      <input type="hidden" readonly name="quantity" value="1"> 
      <input type="hidden" readonly name="notify_url" value="http://XX.111.XXX.XX/payment/response.php">
      <input type="hidden" readonly name="return" value="http://XX.111.XXX.XX/payment/response.php">
      <input type="hidden" readonly name="cancel_url" value="http://XX.111.XXX.XX/payment/">
      <input class="btn btn-success" name="action" value="Recharge" type="submit">
      </form>

因此,对这个主题的任何帮助表示赞赏。

【问题讨论】:

  • 我也面临同样的问题...

标签: php android paypal paypal-ipn paypal-sandbox


【解决方案1】:

您应该确保在您的 PayPal 设置中打开了 IPN:

  • 登录您的 PayPal 帐户并转到个人资料 → 个人资料和设置 → 销售偏好 → 即时付款通知偏好: (或者click here 直接进入页面,确保 在您点击链接之前,您已登录到您的 PayPal 帐户)
  • 在 PayPal 网站上单击打开 IPN。
  • 然后将提示您输入通知 URL,该 URL 应为 任何 URL - 它只会被您的 notify_url 参数替换
  • 保存您的设置

如果您已经这样做了,那么您需要确保您的通知 URL 可以通过外部世界访问,您看起来像是在使用 IP,因此使用 https://www.hidemyass.com/proxy 之类的东西来检查您的网站肯定是可用的。

如果所有其他方法都失败,则可能是 PayPal 以及它从 Android 网络浏览器解码 notify_url 的方式存在问题。我和他们有这个问题,有时notify_url 被缩短了 - 我们怀疑它只在 Android 浏览器上。

检查您的 PayPal 帐户上的 IPN history,您将看到 IPN 发送到的确切 URL 和状态。

【讨论】:

  • 我无法登录,因为我正在使用沙盒帐户登录贝宝帐户。我只有沙盒帐户用于测试。请提出建议。
  • 是 沙盒帐户是一个 PayPal 帐户,但它是沙盒的。您可以像普通的 PayPal 帐户一样登录。
猜你喜欢
  • 2014-02-18
  • 2012-05-20
  • 2013-12-10
  • 2015-02-11
  • 2017-02-14
  • 1970-01-01
  • 2015-01-31
  • 2012-04-09
  • 2012-10-31
相关资源
最近更新 更多