Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Paypal针对rails/activemerchant的嵌入式支付(iframe或其他东西)?_Ruby On Rails_Iframe_Paypal - Fatal编程技术网

Ruby on rails Paypal针对rails/activemerchant的嵌入式支付(iframe或其他东西)?

Ruby on rails Paypal针对rails/activemerchant的嵌入式支付(iframe或其他东西)?,ruby-on-rails,iframe,paypal,Ruby On Rails,Iframe,Paypal,我一整天都在努力让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 =

我一整天都在努力让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错误?我在网上找不到任何好的例子。

我感觉到了你的痛苦。贝宝的整合是非常混乱和痛苦的

替换此:

为此:

应该能解决你的问题。我试过了,但我遇到了另一个问题。 干杯