Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.01 KB

README.textile

File metadata and controls

60 lines (43 loc) · 1.01 KB

WorldPay API Payment for Rails 3 – STILL IN DEVELOPMENT

Specified by: WorldPay payment specification

Installation

Install GEM:

# Gemfile
gem 'worldpay'

# Manually
gem install worldpay
require 'worldpay'

Configuration

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")

Usage