mellat 0.1.3.6.9 → 0.1.3.7.0

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
2
  SHA1:
3
- metadata.gz: 35db60a843cec17e1d78b386b98982604304135a
4
- data.tar.gz: 226cdd90243c6175be2cbaa75c73dc51e98032df
3
+ metadata.gz: 14da1abbe80eda3be280f3fb4cdd0e7924fc6d3e
4
+ data.tar.gz: de207203aa5142b8c23fc80460f22c0cef765a2b
5
5
  SHA512:
6
- metadata.gz: 5de6c8a1a89b8e83667dc72ba601bd0fb45bd2eb376b19aa10f31b152308305d3615ae32a3668178eb60264dae61af4b9cdad4f4a823666be7c8d02ab87ff15e
7
- data.tar.gz: afd340431364948704ad7f69c58fac480cff155688624ec4254f47b13cb0e362f7ce33d4f3ffcdea9b3294023027cc29a7d22c76ba0305bf2d2aff6c75956a9e
6
+ metadata.gz: 3763a6f6d3a063acb0fabd4fcc0242500e082b587422594de49e5ade7b32bfa90a691786b32c5aa9f964785b6aa7dedfb4a1fd10e01484a3bc0d7af315d80ae1
7
+ data.tar.gz: 02e3de69e62383addf244d9a42830f157eff5083e1ad7925f8cf1d9226ac3d29e2e7a900df750ffc9450cdaba5f25b7e3c25b1f16f8573f34a6152388e812466
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- /.idea/
10
+ /.idea/
11
+ /.gem
data/lib/mellat.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "mellat/version"
2
2
  require "mellat/requisition"
3
- require "mellat/verification"
4
3
  require "mellat/respond"
4
+ require "mellat/plug/bank_name"
5
5
 
6
6
  module Mellat
7
7
 
@@ -0,0 +1,23 @@
1
+ # encoding: utf-8
2
+ require 'mellat/plug/unique_bank_code'
3
+ module Mellat
4
+
5
+ module BankName
6
+ def to_bank
7
+ id=self.to_s[0...6]
8
+ return Mellat::UniqueBankCode::IDS[id]
9
+ end
10
+ end
11
+
12
+ end
13
+
14
+ class Integer
15
+ # Patch Integer class to include `to_bank` method
16
+ include Mellat::BankName
17
+
18
+ end
19
+
20
+ class String
21
+ # Patch Integer class to include `to_bank` method
22
+ include Mellat::BankName
23
+ end
@@ -16,8 +16,8 @@ module Mellat
16
16
 
17
17
  def refID
18
18
  @RefID.to_s
19
-
20
19
  end
20
+
21
21
  private
22
22
 
23
23
  def perform_validation
@@ -27,6 +27,6 @@ module Mellat
27
27
  @RefID = @status.split(',')[1] if @valid
28
28
  end
29
29
 
30
- end
30
+ end
31
31
 
32
32
  end
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.3.6.9"
3
+ VERSION = "0.1.3.7.0"
4
4
 
5
5
  end
data/mellat.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
18
 
19
19
  spec.add_dependency 'savon', ['~> 2.0']
20
+ spec.add_dependency 'i18n', ['~> 0.8.0']
20
21
 
21
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
22
23
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mellat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.6.9
4
+ version: 0.1.3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-11 00:00:00.000000000 Z
11
+ date: 2017-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: i18n
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.8.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -74,7 +88,6 @@ extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
90
  - ".gitignore"
77
- - ".idea/vcs.xml"
78
91
  - CODE_OF_CONDUCT.md
79
92
  - Gemfile
80
93
  - LICENSE.txt
@@ -86,15 +99,11 @@ files:
86
99
  - lib/generators/mellat/install_generator.rb
87
100
  - lib/generators/templates/mellat_initializer.rb
88
101
  - lib/mellat.rb
102
+ - lib/mellat/plug/bank_name.rb
89
103
  - lib/mellat/plug/unique_bank_code.rb
90
104
  - lib/mellat/requisition.rb
91
105
  - lib/mellat/respond.rb
92
- - lib/mellat/verification.rb
93
106
  - lib/mellat/version.rb
94
- - mellat-0.1.3.2.gem
95
- - mellat-0.1.3.3.gem
96
- - mellat-0.1.3.4.gem
97
- - mellat-0.1.3.5.gem
98
107
  - mellat.gemspec
99
108
  homepage: https://github.com/mm580486/mellat
100
109
  licenses:
@@ -1,35 +0,0 @@
1
- require "savon"
2
-
3
- module Mellat
4
-
5
- class BpVerifyRequest
6
- attr_accessor :orderId, :amount, :localDate, :localTime, :additionalData, :payerId, :callBackUrl
7
- attr_reader :respond
8
-
9
- def initialize(args = {})
10
- @orderId = args.fetch(:orderId)
11
- @saleOrderId = args.fetch(:saleOrderId)
12
- @saleReferenceId = args.fetch(:saleReferenceId)
13
- @terminalId = Mellat.configuration.terminalId
14
- @userName = Mellat.configuration.userName
15
- @userPassword = Mellat.configuration.userPassword
16
- @response = RespondBpPayRequest.new()
17
- @wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
18
- end
19
-
20
- def call
21
- response = @wsdl.call :bp_verify_request, message: {
22
- 'terminalId' => @terminalId,
23
- 'userName' => @userName,
24
- 'userPassword' => @userPassword,
25
- 'orderId' => @orderId,
26
- 'saleOrderId' => @saleOrderId,
27
- 'saleReferenceId'=> @saleReferenceId,
28
- }
29
-
30
- @response.validate(response.body)
31
- end
32
-
33
- end
34
-
35
- end
data/mellat-0.1.3.2.gem DELETED
Binary file
data/mellat-0.1.3.3.gem DELETED
Binary file
data/mellat-0.1.3.4.gem DELETED
Binary file
data/mellat-0.1.3.5.gem DELETED
Binary file