Class: Sepa::NordeaResponse

Inherits:
Response show all
Includes:
Utilities
Defined in:
lib/sepa/banks/nordea/nordea_response.rb

Instance Attribute Summary

Attributes inherited from Response

#command, #error, #soap

Instance Method Summary collapse

Methods included from Utilities

#calculate_digest, #canonicalize_exclusively, #canonicalized_node, #cert_is_trusted, #cert_request_valid?, #check_validity_against_schema, #csr_to_binary, #decode, #encode, #extract_cert, #format_cert, #format_cert_request, #hmac, #iso_time, #load_body_template, #process_cert_value, #rsa_key, #x509_certificate, #xml_doc

Methods inherited from Response

#application_response, #bank_encryption_certificate, #bank_root_certificate, #bank_signing_certificate, #ca_certificate, #certificate, #content, #doc, #file_references, #hashes_match?, #initialize, #own_encryption_certificate, #signature_is_valid?, #to_s

Constructor Details

This class inherits a constructor from Sepa::Response

Instance Method Details

#own_signing_certificateObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/sepa/banks/nordea/nordea_response.rb', line 5

def own_signing_certificate
  application_response = extract_application_response(NORDEA_PKI)
  at = 'xmlns|Certificate > xmlns|Certificate'
  node = Nokogiri::XML(application_response).at(at, xmlns: NORDEA_XML_DATA)

  return unless node

  cert_value = process_cert_value node.content
  cert = x509_certificate cert_value
  cert.to_s
end