Specified by: WorldPay payment specification
Install GEM:
# Gemfile gem 'worldpay' # Manually gem install worldpay require 'worldpay'
WorldPay can be configured within a config block or YAML file
configuration:
# Initializer config/initializers/worldpay.rb # Content WorldPay.configure do |config| config.environment = :test config.merchant_id = "MERCHANT_ID" config.password = "XML_PASSWORD" end
YAML file (when saved in /config/worldpay.yml, this file is loaded
automatically):
# config.yml global: &global_settings merchant_id: MERCHANT_ID password: XML_PASSWORD development: &development <<: *global_settings environment: test test: <<: *development production: <<: *global_settings environment: production # Ruby WorldPay.configure_from_yaml("config.yml")