Paypal是否支持订阅iframe(templateD)



我有一个Japan Plus帐户,我只是很惊讶订阅不适用于iframe(templateD)

我是这样做的:

  • 使用BMCreateButton api创建subscribe托管按钮(包括templateD作为参数)
  • 然后在网站上使用下面这样的代码,但会得到一个错误,称为in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

<iframe name="hss_iframe" width="570px" height="540px"></iframe>
<form name="form_iframe" target="hss_iframe" action="https://securepayments.paypal.com/cgi-bin/acquiringweb" method="post">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="encrypted" value="BEGIN PKCS7......END PKCS7">
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_auto_billing_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
  <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
<script type="text/javascript">
   document.form_iframe.submit();
</script>

我试过其他类型的按钮,比如Payment,它确实很好用,所以我的问题是:

  • 贝宝支持iframe中的订阅支付吗?(我做错什么了吗?)

  • 如果不支持,最无缝的方法是什么?

您不能通过传递"支付标准"变量通过托管支付端点创建定期配置文件。

PayPal系统将自动执行302重定向到webscr端点(如果浏览器要在iframe之外加载页面,并且设置了X-Frame-Options,则它根本拒绝加载)。

您不能通过HSS(托管的唯一解决方案)创建定期付款配置文件。该产品将只接受信用卡付款从您的网站。

请参阅https://www.paypalobjects.com/webstatic/en_JP/developer/docs/pdf/paymentsplus.pdf支持的集成步骤。

======

  • 如果不支持,最无缝的方法是什么

-->使用订阅"按钮"-看起来您已经绑定到按钮管理器API中,足以通过编程方式创建它们。只需确保您确实将数据提交到paypal.com/cgi-bin/webscr端点即可。

此外,更"灵活"(在可定制性方面)的方法是使用快速结账-定期付款。

你基本上是打一个SetExpressCheckout电话,获得一个代币,然后将买家重定向到PayPal,以授权定期付款。买家会被发送回您的页面,然后您可以使用CreateRecurringPaymentsProfile调用并传递授权的EC令牌来创建Recurring Profile。

想了解更多信息,我建议你看看https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECRecurringPayments/

最新更新