Module: Firstdata

Defined in:
lib/firstdata.rb,
lib/firstdata/version.rb

Constant Summary collapse

VERSION =
"2.2.2"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_urlObject

Returns the value of attribute api_url.



23
24
25
# File 'lib/firstdata.rb', line 23

def api_url
  @api_url
end

.gateway_idObject

Returns the value of attribute gateway_id.



23
24
25
# File 'lib/firstdata.rb', line 23

def gateway_id
  @gateway_id
end

.keyObject

Returns the value of attribute key.



23
24
25
# File 'lib/firstdata.rb', line 23

def key
  @key
end

.key_idObject

Returns the value of attribute key_id.



23
24
25
# File 'lib/firstdata.rb', line 23

def key_id
  @key_id
end

.passwordObject

Returns the value of attribute password.



23
24
25
# File 'lib/firstdata.rb', line 23

def password
  @password
end

Class Method Details

.transact(payload) ⇒ Object



26
27
28
29
# File 'lib/firstdata.rb', line 26

def self.transact(payload)
  body = payload.merge(ExactID: @gateway_id, Password: @password).to_xml(:root => 'Transaction', :dasherize => false, :skip_instruct => true, :skip_types => true)
  post(set_headers(body), body, api_url)
end