我按照这个railscast在rails 4.1 app上设置了活跃的商家.
当我尝试创建订单和付款时,我从paypal服务器收到错误:
Security header is not valid
Run Code Online (Sandbox Code Playgroud)
我的问题:我的设置出现这种错误有什么问题?
顺便说一下,有人知道我可以填写cvv字段用沙盒帐户创建的假信用卡.
paypal ruby-on-rails activemerchant paypal-sandbox ruby-on-rails-4
我正在使用ActiveMerchant让我的rails应用程序访问Paypal的Express Checkout.我想在审核页面上包含订单详细信息,如下所述:https://cms.paypal.com/us/cgi-bin/?cmd = _render-content&content_ID = developer/e_howto_api_ECCustomizing
可以这样做吗?
目前,我的控制器代码如下所示:
def paypal
#currently, options is unused, I'm not sure where to send this info
options = {
:L_NAME0=>"Tickets",
:L_QTY0=>@payment.quantity,
:L_DESC0=>"Tickets for #{@payment.event_name}",
:L_AMT0=>@payment.unit_price
}
#the actual code that gets used
setup_response = gateway.setup_purchase(@payment.amount,
:ip=> request.remote_ip,
:return_url=> url_for(:action=>:confirm, :id=>@payment.id, :only_path=>false),
:cancel_return_url => url_for(:action=>:show, :id=>@payment.id, :only_path=>false)
)
redirect_to gateway.redirect_url_for(setup_response.token)
end
Run Code Online (Sandbox Code Playgroud)
如果我想做的事情是可能的,我需要改变什么?
我正在尝试使用活跃的商家设置PayPal快速结账,但我遇到了问题.我已经按照教程进行了,我可以在paypal上找到"选择支付方式"的表格,但没有显示任何项目或价格.
这是一个截图.http://i39.tinypic.com/35mircz.png
为什么即使我传递它们也没有显示价格或任何物品?这是我用来setup_purchase的代码.
@product = Product.find(params[:product_id])
setup_response = gateway.setup_purchase(200,
:ip => request.remote_ip,
:items => [{:name => "Tickets", :quantity => 22, :description => "Tickets for 232323", :amount => 10}],
:return_url => url_for(:action => 'confirm', :only_path => false),
:cancel_return_url => url_for(:action => 'index', :only_path => false)
)
redirect_to gateway.redirect_url_for(setup_response.token)
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.亚历克斯
我已经看到你应该使用ActiveMerchant进行PayPal集成的帖子,但我也在PayPal网站上找到了这个帖子.我正在努力将文件放在哪个文件中,因为我对RoR完全不熟悉.所以我试图整合PayPal,但不知道在哪里放置哪些代码.
我应该使用活动商家进行PayPal集成,还是Rest-API是最佳选择.我希望人们填写用户名,付费,并在成功时收到数字内容.所以应该有一个结果和用户名的调用.
你有一个循序渐进的链接,至少包括我应该在哪个文件中放置哪些代码,所以我更好地了解了RoR的基础知识.
我正在构建一个使用PayPal Express的市场应用程序。我有一个表格供卖家输入他们的PayPal API凭证,但是我需要一种通过对PayPal进行某种调用来验证它们的方法。
我在ActiveMerchant中使用PaypalExpressGateway,除了标准的购买控件外,我看不到其他任何东西。是否可以使用任何一种空操作?
任何帮助将不胜感激!
Rails 3.0.10和activemerchant gem 1.29.3
我的应用程序在沙箱中工作正常,但生产模式下的事务失败,"安全标头无效","ErrorCode"=>"10002"
我们在审核了所有配置参数一百万次之后,我们用paypal发起了一个支持请求,他们觉得我们遇到了一个不正确的端点.他们已经要求对交易进行全面跟踪,包括标题等,所以我试图弄清楚如何做到这一点.我找到了这篇文章
建议将其添加到配置块
ActiveMerchant::Billing::PaypalGateway.wiredump_device = File.new(File.join([Rails.root, "log", "paypal.log"]), "a")
Run Code Online (Sandbox Code Playgroud)
但这只会导致空日志; 什么都没有被抛弃.
那么,如果可能的话,如何从GATEWAY对象获取此信息?这是生产配置,其格式与staging env中使用的格式相同.
::GATEWAY = ActiveMerchant::Billing::PaypalGateway(
:login => 'me_api1.blah...',
:password => 'string...',
:signature => 'longer string...'
)
Run Code Online (Sandbox Code Playgroud)
谢谢.
在设置我的活跃商家git时,我一直在努力解决安装libxml-ruby的错误.我多次用Google搜索错误的所有组成部分,但我只是不确定我在看什么.有一堆"没有" - 任何人都知道如何解释我可能缺少的东西?
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
/Users/tommynicholas/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
*** extconf.rb failed ***
Could not create Makefile due to …Run Code Online (Sandbox Code Playgroud) 我觉得很多文档都已经过时了,但这是我到目前为止所尝试的内容:
我正在使用ActiveMerchant::Billing::PaypalExpressGateway网关.
首先,我设置购买并将用户重定向到Paypal:
response = gateway.setup_purchase price,
return_url: <confirm url>,
cancel_return_url: <cancel url>,
items: [
{
name: 'My Item',
quantity: 1,
description: "My Item Description",
amount: price
}
]
redirect_to gateway.redirect_url_for(response.token)
Run Code Online (Sandbox Code Playgroud)
这是有效的,我可以作为沙盒买家登录并确认付款,这让我<confirm url>从上面回来.在确认中,我做:
response = gateway.recurring price, nil,
token: params[:token],
period: 'Year',
frequency: 1,
start_date: Time.now,
description: 'My Item Subscription'
Run Code Online (Sandbox Code Playgroud)
当我这样做时,我从response变量中的Paypal收到无效的令牌错误.令牌似乎没问题,当我被带回确认网址时,它会出现在网址中.我然后直接(params[:token])将其发送回Paypal.
我做错了什么吗?就像我说的,似乎很多这类过程的文档已经过时(或者我正在尝试的是过时的东西...)
我需要将活跃的商户异地支付网关“Direct-Ebanking”/Sofortüberweisung.de 添加到我的 Spree Commerce 项目。然而,似乎几乎没有关于如何做到这一点的文档。我能找到的最好的链接是指向 github 上的 active_merchant read me 中支持的网关列表的链接。但是 Spree 和 Active Merchant 究竟是如何协同工作的呢?是否有任何关于如何实现 active_Merchant 支持的异地网关的简短教程或提示(因为这里的想法是支持信用卡支付)?
任何帮助都非常感谢..
谢谢堆。
最大限度
我正在尝试将payumoney支付网关集成到我的rails应用程序中.
我添加了gem active_merchant_payu_in,但是在此之后我无法启动app "warning: already initialized constant APP_PATH ".. 并且得到这个控制台错误..我发现这个模块来自于activemerchant我安装在我的gemfile而不是这个,现在我的应用程序启动.
根据文档,这是我们设置activemerchant的方式
ActiveMerchant::Billing::Base.mode = :test
::SAMPLEGATEWAY = ActiveMerchant::Billing::TrustCommerceGateway.new(
:login => 'TestMerchant',
:password => 'password')
Run Code Online (Sandbox Code Playgroud)
因此,对于payu我改变了网关下面,但我应该怎么传递的,而不是:login和:password在下面的代码?
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::PayuInGateway.new(
)
Run Code Online (Sandbox Code Playgroud)
对于payumoney我们都有
商家ID,商家钥匙,商家盐
我无法在任何地方找到足够的文档.有人可以对这个话题有所了解吗?