Module: Banklink::Seb

Defined in:
lib/banklink/seb.rb,
lib/banklink/seb/helper.rb,
lib/banklink/seb/notification.rb

Defined Under Namespace

Classes: Helper, Notification

Class Method Summary collapse

Class Method Details

.get_bank_public_keyObject

RSA public key of the bank, taken from the X509 certificate of the bank. OpenSSL container.



10
11
12
13
14
# File 'lib/banklink/seb.rb', line 10

def self.get_bank_public_key
  cert = self.bank_certificate
  # OpenSSL::X509::Certificate.new(cert.gsub(/  /, '')).public_key
  OpenSSL::X509::Certificate.new(cert).public_key
end

.get_private_keyObject

Our RSA private key. OpenSSL container.



18
19
20
21
# File 'lib/banklink/seb.rb', line 18

def self.get_private_key
  private_key = self.private_key
  OpenSSL::PKey::RSA.new(private_key.gsub(/  /, ''))
end

.helper(order, account, options = {}) ⇒ Object



29
30
31
# File 'lib/banklink/seb.rb', line 29

def self.helper(order, , options = {})
  Helper.new(order, , options)
end

.notification(post) ⇒ Object



25
26
27
# File 'lib/banklink/seb.rb', line 25

def self.notification(post)
  Notification.new(post)
end