Wednesday, 7 September 2011

Payment could not be processed, please check the details you entered with Authorize.net in spree

 When I am working with Authorize.net payment gateway in Spree application in rails. I have face issue with payment process. I have faced issue and used to get

error: Payment could not be processed, please check the details you entered


After gogling for solution, I have found one more solution. Here is the reference URL.

http://blog.endpoint.com/2010/04/spree-authorizenet-authorization.html



In this they have given few tips to make the payment gateway authorize.net to work in spree. He mentioned that "Mark Johnson responded to my question on authorize versus authorize and capture that the Authorize.Net request type be changed from "AUTH_ONLY" to "AUTH_CAPTURE"."



The auto_capture setting defaults to false, not surprisingly, so it can be updated with one of the following changes.



# *_extension.rb:
def activate
  AppConfiguration.class_eval do
    preference :auto_capture, :boolean, :default => true
  end
end

# EXTENSION_DIR/config/initializers/*.rb:
if Preference.table_exists?
  Spree::Config.set(:auto_capture => true)
end


 So finally I have made changes in  config/initializers/*.rb by adding below lines.


if Preference.table_exists?
  Spree::Config.set(:auto_capture => true)
end



The above modifications worked for me to make a successful checkout.



While checking through the Authorize.net merchant account I didn't found the last transcation what i have made form the application.

No comments:

Post a Comment