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


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](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](https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/gateways/quickbooks.rb)