【问题标题】:Paypal embedded payments (iframe or something else) for rails/activemerchant?为 Rails/activemerchant 嵌入 Paypal 支付(iframe 或其他)?
【发布时间】:2014-10-24 23:21:34
【问题描述】:

我整天都在尝试将 paypal 与我的网站集成。我能得到的最接近的是:

控制台日志:

Refused to display 'https://www.sandbox.paypal.com/incontext?cmd=_express-checkout&token=TOKEN&useraction=commit' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. 

在我的控制器中:

 response = DIGITAL_GATEWAY.setup_purchase(price,
                                              :description => 'test descript',
                                              :ip => request.remote_ip,
                                              :return_url => 'http://localhost:3000/',
                                              :cancel_return_url => 'http://localhost:3000/',
                                              :shipping_address => false,

                                              :items => [{:name => "#{@model.name}",
                                                          :number => @model.id,
                                                          :quantity => "1",
                                                          :amount => price,
                                                          :description => @model.description,
                                                          :category => "Digital"}]
    )

您如何设置嵌入式支付/解决 iframe 错误?我在网上找不到任何好的例子。

【问题讨论】:

    标签: ruby-on-rails iframe paypal


    【解决方案1】:

    我感觉到你的痛苦。 PayPal 集成非常令人困惑和痛苦。

    替换这个: https://www.sandbox.paypal.com/incontext?cmd=_express-checkout&token=TOKEN&useraction=commit

    有了这个: https://www.sandbox.paypal.com/incontext?token=TOKEN

    应该可以解决您的问题。当我尝试时确实如此,但我陷入了另一个问题。 干杯。

    【讨论】:

      猜你喜欢
      • 2011-06-16
      • 2011-03-21
      • 2011-10-29
      • 2013-04-29
      • 2014-12-13
      • 2011-09-06
      • 2010-10-15
      • 2011-10-07
      • 2012-04-19
      相关资源
      最近更新 更多