Skip to content

Setup payment processor

drhenner edited this page Mar 22, 2012 · 1 revision

this is an example to change to use paypal

To set this up you need to start by editing the config.yml file....


In config/config.yml

paypal:
  ip:         192.168.0.1
  login:      someLOGIN.yahoo.com
  password:   somePASSWORD
  signature:  someSIGNATURE

Then edit the environment.rb


from

 CIM_LOGIN_ID        = HADEAN_CONFIG['authnet']['login']
 CIM_TRANSACTION_KEY = HADEAN_CONFIG['authnet']['password']

to

 CIM_LOGIN_ID        = HADEAN_CONFIG['paypal']['login']
 CIM_TRANSACTION_KEY = HADEAN_CONFIG['paypal']['password']

config/environments/development.rb config/environments/test.rb config/environments/production.rb

change

::GATEWAY = ActiveMerchant::Billing::AuthorizeNetGateway.new(
  :login    => HADEAN_CONFIG['authnet']['login'],
  :password => HADEAN_CONFIG['authnet']['password'],
  :test     => true  
)

to

::GATEWAY = ActiveMerchant::Billing::AuthorizeNetGateway.new(
  :login    => HADEAN_CONFIG['paypal']['login'],
  :password => HADEAN_CONFIG['paypal']['password'],
  :signature  => HADEAN_CONFIG['paypal']['signature'],
  :test     => true   #
)
Clone this wiki locally