nps_sdk 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cab606c49f8e1f21269f86d9c8c7a1f81b5e2f19
4
- data.tar.gz: 71ab58b6ed0d164a53370bbbaf3fbe159e7d2cbf
3
+ metadata.gz: 10f5c27167c34b4325c3ee096404ea2dbaea96e0
4
+ data.tar.gz: 83b4db5e36165e6a8f1f6166a755dbd7014f2cfd
5
5
  SHA512:
6
- metadata.gz: 07dc075254a54198de6b24d45686e4b7992157fc0907d082860fce5b37e812783bebf881d27c69cfd678b2d873dbbfd89c2b487aaab4f1c060f49daab0ea455f
7
- data.tar.gz: 4e8a12941c9c5394aee7387544e69eb76a965e85c6c1043dc8195c38c2a1432735992018a50fac5716dd019de3eabca3d6d36cd917ff9e43489a6507c408add9
6
+ metadata.gz: 460196163b3f16c77404c219467b9f7fe6fd8be3170440679b584afd106360a4a3a0fbedd69b542385776ad9146bf977093ac1904d2deadc6ee3c9a7cd1419b2
7
+ data.tar.gz: b04ae34f091946211370089310d59b4f2813b59c4eb87a62cd04358136c32e0f8bbcc87685fa62831c253cbc6548857dc1fc65643c4852dc451e321e6cb17e5f
data/lib/nps/sdk.rb CHANGED
@@ -139,5 +139,9 @@ module Nps
139
139
  soap_call(Services::SPLIT_AUTHORIZE_2P, params)
140
140
  end
141
141
 
142
+ def query_card_details(params)
143
+ soap_call(Services::QUERY_CARD_DETAILS, params)
144
+ end
145
+
142
146
  end
143
147
  end
data/lib/nps/services.rb CHANGED
@@ -17,6 +17,7 @@ class Services
17
17
  NOTIFY_FRAUD_SCREENING_REVIEW=:notify_fraud_screening_review
18
18
  GET_IIN_DETAILS=:get_iin_details
19
19
  QUERY_CARD_NUMBER=:query_card_number
20
+ QUERY_CARD_DETAILS=:query_card_details
20
21
  CREATE_PAYMENT_METHOD = :create_payment_method
21
22
  CREATE_PAYMENT_METHOD_FROM_PAYMENT =:create_payment_method_from_payment
22
23
  RETRIEVE_PAYMENT_METHOD =:retrieve_payment_method
@@ -1,3 +1,4 @@
1
+ require 'certifi'
1
2
  module Nps
2
3
  class SoapClient
3
4
 
@@ -19,8 +20,8 @@ module Nps
19
20
  @wsdl = conf.environment
20
21
  @open_timeout = conf.o_timeout.nil? ? 5 : conf.o_timeout
21
22
  @read_timeout = conf.r_timeout.nil? ? 60 : conf.r_timeout
23
+ @verify_ssl = conf.verify_ssl.nil? ? true : conf.verify_ssl
22
24
  @sanitize = conf.sanitize.nil? ? true : conf.sanitize
23
- @verify_ssl = conf.verify_ssl
24
25
  @log_level = conf.log_level ? conf.log_level : nil
25
26
  @proxy = conf.proxy_url ? conf.proxy_url : nil
26
27
  @proxy_username = conf.proxy_username ? @proxy_username : nil
@@ -49,8 +50,7 @@ module Nps
49
50
  if @verify_ssl
50
51
  ssl_config = {
51
52
  ssl_verify_mode: :peer,
52
- ssl_cert_file: @cert_file,
53
- ssl_cert_key_file: @cert_key
53
+ ssl_ca_cert_file: Certifi.where
54
54
  }
55
55
  client_config.merge!(ssl_config)
56
56
  end
data/lib/nps/utils.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Nps
2
2
  class Utils
3
3
  SDK = {language: 'Ruby', version: RUBY_VERSION}
4
- API_VERSION = {version: '1'}
4
+ API_VERSION = {version: '2.2'}
5
5
  CACHE_TTL = 1
6
6
  TIMEOUT = 90
7
7