Reputation: 44066
I am using activemerchant in a rails application like this
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY"
)
and I keep getting this error code
error_code: \"10117\"\nauth_code: \"000000\"\nstatus: Error\nerror: Transaction authentication required.\n
when i look at the error codes (10117) for usaepay I notice that i need to enter in the pin. This I have, but i dont know how to implement. I tried these two below
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:password => "MYPIN"
)
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:pin => "MYPIN"
)
and I still get the same error Looking at the USAEPAY Library's initializer I see login but not pin
def initialize(options = {})
requires!(options, :login)
@options = options
super
end
...any ideas how I can sent this pin into Activemerchant
UPDATE
here is my call to the transaction
options = {
:card_code=>self.card_verification
:billing_address=>{
:address1=>self.billing_address,
:city=>self.city,
:state=>self.state,
:zip=>self.zip,
:country=>"US"
}
}
response = GATEWAY.purchase(price_in_cents, credit_card, options)
i tried to do this
options = {
:card_code=>self.card_verification,
:pin=>"333333",
:billing_address=>{
:address1=>self.billing_address,
:city=>self.city,
:state=>self.state,
:zip=>self.zip,
:country=>"US"
}
}
response = GATEWAY.purchase(price_in_cents, credit_card, options)
but still nothing
Upvotes: 0
Views: 318
Reputation: 6642
Maybe you need to pass the authorization pin into the transaction. Can you paste the code where you call a transaction, please?
For example, calling this method: capture(money, authorization, options = {})
Edit:
I don't think ActiveMerchant has the pin feature implemented. Here are your options:
gem 'activemerchant', :git => 'git://github.com/kalinchuk/active_merchant.git'
It will install a gem from my github account. I added the pin field to active merchant.You can then call:
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:pin => "PIN"
)
Upvotes: 1