Class: Cybersourcery::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersourcery/container.rb

Class Method Summary collapse

Class Method Details

.get_cart_signature_checker(profile_name, params, session) ⇒ Object



9
10
11
12
# File 'lib/cybersourcery/container.rb', line 9

def self.get_cart_signature_checker(profile_name, params, session)
  profile = Cybersourcery::Profile.new(profile_name)
  Cybersourcery::CartSignatureChecker.new({ profile: profile, params: params, session: session})
end

.get_cart_signer(profile_name, session, cart_fields) ⇒ Object



3
4
5
6
7
# File 'lib/cybersourcery/container.rb', line 3

def self.get_cart_signer(profile_name, session, cart_fields)
  profile = Cybersourcery::Profile.new(profile_name)
  cybersource_signer = Cybersourcery::CybersourceSigner.new(profile)
  Cybersourcery::CartSigner.new(session, cybersource_signer, cart_fields)
end

.get_cybersource_signature_checker(profile_name, params) ⇒ Object



14
15
16
17
# File 'lib/cybersourcery/container.rb', line 14

def self.get_cybersource_signature_checker(profile_name, params)
  profile = Cybersourcery::Profile.new(profile_name)
  Cybersourcery::CybersourceSignatureChecker.new({ profile: profile, params: params })
end

.get_payment(profile_name, params, payment_class_name = 'Payment') ⇒ Object



19
20
21
22
23
# File 'lib/cybersourcery/container.rb', line 19

def self.get_payment(profile_name, params, payment_class_name = 'Payment')
  profile = Cybersourcery::Profile.new(profile_name)
  signer = Cybersourcery::CybersourceSigner.new(profile)
  payment_class_name.constantize.new(signer, profile, params)
end