search for: paypalgateway

Displaying 2 results from an estimated 2 matches for "paypalgateway".

2008 Aug 24
2
config.after_initialize and development mode
Hi, I''m using activemerchant and setting up a class variable using config.after_initialize. It works great for the first request, but then the variable is nil. config.after_initialize do ActiveMerchant::Billing::Base.mode = :test OrderTransaction.gateway = ActiveMerchant::Billing::PaypalGateway.new(...) end I''m assuming this is is due to the model reloading after each request in development mode, right? When that happens OrderTransaction.gateway is nilified. Is there a way to prevent a model from being reloaded in development mode, and is this the best way to handle the problem...
2007 Oct 13
4
Chapter 9
...message #{e}") self.error_message = ''Error while processing order'' self.status = ''failed'' end save! self.status == ''processed'' end end def process_with_active_merchant Base.gateway_mode = :test gateway = PaypalGateway.new( :login => ''xxx_xxxxx_biz_api1.xxx.com'', :password => ''xxxxxx'', :pem => File.read(File.join(File.dirname(__FILE__), "../../ config/paypal/cert_key_pem.txt"))) #:cert_path => File.join(File.dirname(__FILE__...