azericard 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/azericard/configuration.rb +2 -2
- data/lib/azericard/request.rb +2 -2
- data/lib/azericard/version.rb +1 -1
- data/test/configuration_test.rb +2 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8deed461be50475476e6720e1b447a2a6b6ede45f49a46655fe001526c4f3d2f
|
4
|
+
data.tar.gz: 0db1b7b59fb26273a35d3bf85c7f374d368435347f2cf9b276640ed00ecd5cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9693c4a47aac9c318bb6ebe2aa52d6cb2a6f01e427f5e11eeb97f43f2abb854703bf5d67dd707197bc75d7bb32e3169c0ffde1b6663cfadd30e48ac5b187bb3
|
7
|
+
data.tar.gz: 470c513782f6420af33cd19da0fe3b358398f62f0ad258ec7ed6c4f61ef8b920da991368e9f20f3b350df074cdb63de3ff7934482965a3dc7bc4a0c80b764424
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Azericard
|
2
2
|
module Configuration
|
3
3
|
VALID_OPTIONS_KEYS = [
|
4
|
-
:endpoint, :terminal, :secret_key, :user_agent,
|
4
|
+
:endpoint, :terminal, :secret_key, :user_agent, :debug,
|
5
5
|
:merchant_name, :merchant_url, :merchant_email, :country_code, :gmt_offset
|
6
6
|
].freeze
|
7
7
|
DEFAULT_USER_AGENT = "Azericard Ruby Gem #{Azericard::VERSION}".freeze
|
8
8
|
|
9
|
-
attr_accessor
|
9
|
+
attr_accessor(*VALID_OPTIONS_KEYS)
|
10
10
|
|
11
11
|
def self.extended(base)
|
12
12
|
base.reset
|
data/lib/azericard/request.rb
CHANGED
@@ -17,7 +17,7 @@ module Azericard
|
|
17
17
|
ssl_verifypeer: false,
|
18
18
|
ssl_verifyhost: 2,
|
19
19
|
sslversion: 'tlsv1.2',
|
20
|
-
|
20
|
+
verbose: Azericard.debug,
|
21
21
|
headers: {
|
22
22
|
"User-Agent" => Azericard.user_agent
|
23
23
|
},
|
@@ -38,7 +38,7 @@ module Azericard
|
|
38
38
|
response = request.run
|
39
39
|
|
40
40
|
if response.success?
|
41
|
-
if response.body == '0'
|
41
|
+
if response.body.strip == '0'
|
42
42
|
true
|
43
43
|
else
|
44
44
|
raise AzericardResponseError, "Azericard responded with: #{response.body[0..4]}"
|
data/lib/azericard/version.rb
CHANGED
data/test/configuration_test.rb
CHANGED
@@ -15,6 +15,7 @@ class ConfigurationTest < Minitest::Test
|
|
15
15
|
Azericard.merchant_url = 'https://merchant.example.com'
|
16
16
|
Azericard.country_code = 'AZ'
|
17
17
|
Azericard.gmt_offset = '+4'
|
18
|
+
Azericard.debug = true
|
18
19
|
|
19
20
|
assert_equal 'https://example.com/cgi-bin/cgi_link', Azericard.endpoint
|
20
21
|
assert_equal '12345678', Azericard.terminal
|
@@ -24,6 +25,7 @@ class ConfigurationTest < Minitest::Test
|
|
24
25
|
assert_equal 'https://merchant.example.com', Azericard.merchant_url
|
25
26
|
assert_equal 'AZ', Azericard.country_code
|
26
27
|
assert_equal '+4', Azericard.gmt_offset
|
28
|
+
assert Azericard.debug
|
27
29
|
end
|
28
30
|
|
29
31
|
def test_user_agent
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azericard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nihad Abbasov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -75,7 +75,7 @@ files:
|
|
75
75
|
homepage: https://github.com/narkoz/azericard
|
76
76
|
licenses: []
|
77
77
|
metadata: {}
|
78
|
-
post_install_message:
|
78
|
+
post_install_message:
|
79
79
|
rdoc_options: []
|
80
80
|
require_paths:
|
81
81
|
- lib
|
@@ -90,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
94
|
-
signing_key:
|
93
|
+
rubygems_version: 3.1.4
|
94
|
+
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Unoffical gem to provide a ruby interface for Azericard electronic payment
|
97
97
|
system
|