Tag: activemerchant

我可以在Rails 4应用程序中使用带有条带的活动商家中传递不同的货币吗?

我正在开发Rails 4应用程序,用户可以通过应用程序订阅一次性付费。 对于订阅,请使用带有条带的Active Merchant,现在用户现在支付50美元并成功完成付款。 下面的代码: ActiveMerchant::Billing::Base.mode = :test transaction = ActiveMerchant::Billing::StripeGateway.new(:login => Rails.application.secrets.stripe_secret_key) paymentInfo = ActiveMerchant::Billing::CreditCard.new( :number => purchage_params[:card_holder_number], :month => purchage_params[:expiry_month], :year => purchage_params[:expiry_year], :verification_value => purchage_params[:cvv]) purchaseOptions = {:billing_address => { :name => purchage_params[:card_holder_name], :currency => @country.currency, :address1 => session[:address], :city => session[:city], :state => @region.name, :zip => session[:zip_postal] }} response = transaction.purchase((amount […]

Ruby:如何使用凭据初始化活动商家网关实例?

来自http://www.rubydoc.info/github/Shopify/active_merchant/ActiveMerchant%2FBilling%2FBase.gateway 我应该使用它来初始化active_merchant的一个实例 gateway = ActiveMerchant::Billing::Base.gateway( gateway_name ).new( :username => :some_credential :password => :some_other_credential ) 但我不知道:username提前:username或:password ,但是它们在fixtures文件https://github.com/activemerchant/active_merchant/blob/master/test/fixtures.yml这里。 那么如何正确地做到这一点? 举个例子,在fixtures.yml文件中我们可以看到这个.. adyen: username: ” password: ” merchant_account: ” 因此我们可以用这个初始化.. gateway = ActiveMerchant::Billing::Base.gateway( ‘adien’ ).new( username: => :some_credential password: => :some_other_credential merchant_account: => some_more_credential ) 我需要能够初始化网关实例而无需硬编码上面示例中的username: , password:和merchant_account:参数。 提前致谢!

测试Paypal Express Gateway重定向到live而不是sandbox

我想通过在请求中添加订单项详细信息来自定义我的快速结帐。 我按照这里提到的说明进行操作 但是,进行此更改会将我重定向到paypal.com/cgi-bin/webscr而不是sandbox.paypal.com/cgi-bin/webscr 我的开发.rb: MyApp::Application.config.after_initialize do ActiveMerchant::Billing::Base.mode = :test ::EXPRESS_GATEWAY = ActiveMerchant::Billing::PaypalExpressGateway.new(:login => “***”, :password => “***”, :signature => “***”) test.rb: config.after_initialize do ActiveMerchant::Billing::Base.mode = :test ::EXPRESS_GATEWAY = ActiveMerchant::Billing::BogusGateway.new 我的订单管理员: def express @order1 = current_order @options = express_options(@order1) @total1 = @order1.item_total.to_i @response = EXPRESS_GATEWAY.setup_purchase(@total1, @options) redirect_to EXPRESS_GATEWAY.redirect_url_for(@response.token) end private def express_options order options = {} […]

具有Activemerchant的Etsy式市场? (导轨)

我正处于将供应商市场(类似于Etsy,但对于一个非常小众的人口统计)整合到在线社区的早期阶段。 我设想了一个平台,允许供应商注册和发布待售商品,所有交易都通过平台处理。 付款将从消费者直接支付给供应商的Paypal帐户。 每笔交易将产生处理费,并在每30天结束时向供应商收取所有费用的总和。 我简要介绍了Activemerchant,虽然我觉得它可能是适合这项工作的合适工具。 这听起来像使用Activemerchant可以完成的事情吗?

如何在rails中实现支付系统

我是rails世界的新手,我正在为客户设置一个小型rails应用程序。 其中一个要求是用户输入他们的信用卡,该信用卡按指定金额收费。 我对支付系统没有多少经验。 我相信活跃的商家gem可以用于此目的,但实际上如何计算卡的工作量和测试目的,我能够收取虚拟账户吗? 根据您的经验,与paypal这样的提供商合作是否安全?

在Active Merchant / PayPal Express Checkout中设置税额

我需要知道如何使用Active Merchant和rails将税额传递给PayPal Express Checkout。 一切都在运作(完成翻译),除了我无法弄清楚如何设定税收。 谢谢你的帮助!

需要API签名才能向PayPal发出错误请求,我已经有了一个API签名集

我现在遇到了很大的问题。 我的网站是用Ruby on Rails编写的,我正在使用活跃的商家gem来与PayPal进行交互。 该网站托管在heroku上。 我在我的heroku应用程序中将API密钥和API签名设置为配置变量。 但是,我仍然得到错误: Running: rake assets:precompile (in /tmp/build_3pvaswdp7wvca1) rake aborted! An API Certificate or API Signature is required to make requests to PayPal (See full trace by running task with –trace) 我可以运行heroku运行rake资产:单独预编译,并且完全正常。 此外,我的暂存站点在我的暂存站点上设置了完全相同的配置变量(RACK_ENV和RAILS_ENV设置为临时站点btw上的生产),这似乎工作正常。 但是,我的生产网站崩溃了。 关于可能发生的事情/如何解决这个问题的任何想法?

使用ActiveMerchant和PayPal在实际网站上接受虚拟信用卡

我正在建立一个可以接受ActiveMerchant和PayPal网站付款专业版信用卡的铁路网站。 我正在成功测试PayPal沙箱,但也需要能够在我的实时网站上进行测试。 我想实施一个解决方案,通过我自己的域中的电子邮件地址在我的实时网站上注册使用PayPal沙箱,但对于其他所有人,它使用实时的PayPal网站。 这样,当我测试我的实时网站时,我不付钱给自己并在此过程中被PayPal征税:-) 但问题是,要让ActiveMerchant使用您编写此行的测试服务器: ActiveMerchant::Billing::Base.mode = :test 当我只希望一个事务以目标测试服务器为目标时,它设置一个类变量,该变量将应用于站点上的其他事务。 谁能提出优雅的解决方案? 或者除了我想到的解决方案之外,还有更好的方法来实现这一目标吗?

使用ActiveMerchant自定义Paypal Express的评论页面

我正在使用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 => […]

ActiveMerchant是否支持基于订阅的事务

我想在我的rails应用程序中集成ActiveMerchant。 我有一些计划,如果订阅限制用户访问。 正如你们所有人都知道基于订阅的应用程序是什么,我不打算解释我的应用程序。 请告诉我一些实现这一目标的例子。 我已经查看过电视剧141到146,但Ryan只展示了Paypal Web Payments Standard和Paypal Web Payments Pro。 我也读了很多博客,但没有帮助。 请帮忙。 提前致谢。