How to use QuickbooksGateway for ActiveMerchant::Billing::QuickbooksGateway

9 views
Skip to first unread message

Jai shanker

unread,
Sep 11, 2015, 6:40:45 AM9/11/15
to Ruby on Rails: Talk
Hi,

I am integrating QuickbooksGateway using ActiveMerchant gem, Used below code:

config.after_initialize do
    ActiveMerchant::Billing::Base.mode = :test
    ::GATEWAY = ActiveMerchant::Billing::QuickbooksGateway.new(
      :consumer_key => 'xxxxxxxxxxxxxxx',
      :consumer_secret => 'xxxxxxxxxxx',
      :access_token => 'xxxxxxxxx',
      :token_secret => 'xxxxxxxxx',
      :realm => "xxxxxxxxx"
      )
  end

But when doing payment getting error:
Call:
response = GATEWAY.purchase(self.amount, credit_card, purchase_options)
Error: 
#<ActiveMerchant::Billing::Response:0x007f96e49dfbc0 @params={"errors"=>[{"message"=>"The merchant account could not be validated.", "detail"=>"", "infoLink"=>"https://developer.intuit.com/v2/docs?redirectID=PayErrors", "code"=>"PMT-3000", "type"=>"account_error"}]}, @message="The merchant account could not be validated.", @success=false, @test=true, @authorization=nil, @fraud_review=false, @error_code="processing_error", @emv_authorization=nil, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}>

Can anyone help me out.

Please find link fro more clarification: https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/gateways/quickbooks.rb

Reply all
Reply to author
Forward
0 new messages