Method: MerbMerchant::Billing::LinkpointGateway#initialize

Defined in:
lib/merb_merchant/billing/gateways/linkpoint.rb

#initialize(options = {}) ⇒ LinkpointGateway

Returns a new instance of LinkpointGateway.

Raises:

  • (ArgumentError)


112
113
114
115
116
117
118
119
120
121
# File 'lib/merb_merchant/billing/gateways/linkpoint.rb', line 112

def initialize(options = {})
  requires!(options, :login)
  
  @options = {
    :result => 'LIVE',
    :pem => LinkpointGateway.pem_file
  }.update(options)
  
  raise ArgumentError, "You need to pass in your pem file using the :pem parameter or set it globally using MerbMerchant::Billing::LinkpointGateway.pem_file = File.read( File.dirname(__FILE__) + '/../mycert.pem' ) or similar" if @options[:pem].blank?
end