azericard 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 90ec2ee73c57df60e03b623dd807d229f5b2de52
4
- data.tar.gz: a1fc1b14ccbce029552db4e45fbe163b7e40cce5
2
+ SHA256:
3
+ metadata.gz: 0b70dd8c460a48c4f9a89fd936a775fdc44ad35f4eb226c90b2baa960b095cb2
4
+ data.tar.gz: 8adfb768825ccf0e0608bf07a773fe0bd8f58ee6d7a205f24999f6c394431e65
5
5
  SHA512:
6
- metadata.gz: 1b21b852edef36c5b80c936d0107dfc07721324fd35670bfdccacd397412979996df85a025b98d0b5d52481a95c205def4e7ffe226de689d401ba407751f7fe2
7
- data.tar.gz: 57d270f641f2641977569115d2fb6394cb8d18e28c7f82927f8282dff5cca815eff1a1e37ab249268ba384bbe5ecea36a9456863541941c90a70fd9b018dbd94
6
+ metadata.gz: 173084219288f64630525334dbe396a0e4271de7572f246a7ed566c7101751ceab40b09ad949f119d477a735cb749896067e558eb484f1ff575d19c3fd0e4cf8
7
+ data.tar.gz: f3730ddabeaa68c0bb48c30f6fa3968d6ec8658b79a2afb96985da134939749edbaa039f6eccfe60d144f89345e2d7791263e14c3e8fec1654f5ecac01f3fbb8
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Azericard
2
2
 
3
- Responsible for one of the most discussed and popular web projects of 2013,
4
- Nihad Abbasov returns to GitHub with a gem that could well follow in its
5
- footsteps - Azericard.
3
+ Unoffical Ruby interface to AzeriCard online payment processing system.
4
+
5
+ ## Legal
6
+
7
+ This code is in no way affiliated with, authorised, maintained, sponsored or
8
+ endorsed by AzeriCard LLC or any of its affiliates or subsidiaries. This is an
9
+ independent and unofficial. Use at your own risk.
6
10
 
7
11
  ## Installation
8
12
 
@@ -7,9 +7,9 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "azericard"
8
8
  spec.version = Azericard::VERSION
9
9
  spec.authors = ["Nihad Abbasov"]
10
- spec.email = ["mail@narkoz.me"]
10
+ spec.email = ["nihad@42na.in"]
11
11
  spec.description = "Provides an interface to AzeriCard online payment processing system"
12
- spec.summary = "A gem to provide a ruby interface for Azericard electronic payment system"
12
+ spec.summary = "Unoffical gem to provide a ruby interface for Azericard electronic payment system"
13
13
  spec.homepage = "https://github.com/narkoz/azericard"
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
@@ -19,4 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_runtime_dependency 'typhoeus'
21
21
  spec.add_development_dependency 'rake'
22
+ spec.add_development_dependency 'minitest'
22
23
  end
@@ -1,3 +1,6 @@
1
+ require 'openssl'
2
+ require 'securerandom'
3
+
1
4
  module Azericard
2
5
  module Request
3
6
  # @param [Azericard::AzericardOptions] request_options
@@ -83,7 +86,7 @@ module Azericard
83
86
  backref = options.fetch(:backref)
84
87
 
85
88
  text_to_sign = "#{amount.size}#{amount}#{currency.size}#{currency}#{order.size}#{order}" \
86
- "#{desc.size}#{desc}#{merch_name.size}#{merch_name}#{merch_url.size}#{merch_url}-" \
89
+ "#{desc.size}#{desc}#{merch_name.size}#{merch_name}#{merch_url.size}#{merch_url}" \
87
90
  "#{terminal.size}#{terminal}#{email.size}#{email}#{tr_type.size}#{tr_type}#{country.size}#{country}" \
88
91
  "#{merch_gmt.size}#{merch_gmt}#{timestamp.size}#{timestamp}#{nonce.size}#{nonce}#{backref.size}#{backref}"
89
92
  elsif tr_type == '21' || tr_type == '24'
@@ -1,3 +1,3 @@
1
1
  module Azericard
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -1,7 +1,7 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'azericard'
3
3
 
4
- class ConfigurationTest < Test::Unit::TestCase
4
+ class ConfigurationTest < Minitest::Test
5
5
  def teardown
6
6
  Azericard.reset
7
7
  end
@@ -1,7 +1,7 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'azericard'
3
3
 
4
- class RequestTest < Test::Unit::TestCase
4
+ class RequestTest < Minitest::Test
5
5
  def setup
6
6
  Azericard.endpoint = 'https://example.com/cgi-bin/cgi_link'
7
7
  Azericard.terminal = '12345678'
@@ -31,7 +31,7 @@ class RequestTest < Test::Unit::TestCase
31
31
  backref: 'https://shop.example.com'
32
32
  }
33
33
  request_options = Azericard::Request.options_for_request(options)
34
- assert (/422\.53AZN945328402311Description8Merchant28https:\/\/merchant\.example\.com-81234567820merchant@example\.com102AZ2\+4/).match request_options.text_to_sign
34
+ assert (/422\.53AZN945328402311Description8Merchant28https:\/\/merchant\.example\.com81234567820merchant@example\.com102AZ2\+4/).match request_options.text_to_sign
35
35
 
36
36
  options = {
37
37
  amount: '22.5',
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
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2019-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -38,9 +38,23 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Provides an interface to AzeriCard online payment processing system
42
56
  email:
43
- - mail@narkoz.me
57
+ - nihad@42na.in
44
58
  executables: []
45
59
  extensions: []
46
60
  extra_rdoc_files: []
@@ -76,11 +90,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
90
  - !ruby/object:Gem::Version
77
91
  version: '0'
78
92
  requirements: []
79
- rubyforge_project:
80
- rubygems_version: 2.4.8
93
+ rubygems_version: 3.0.3
81
94
  signing_key:
82
95
  specification_version: 4
83
- summary: A gem to provide a ruby interface for Azericard electronic payment system
96
+ summary: Unoffical gem to provide a ruby interface for Azericard electronic payment
97
+ system
84
98
  test_files:
85
99
  - test/configuration_test.rb
86
100
  - test/request_test.rb