mellat 0.1.3.7.0 → 0.1.3.7.1

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: 14da1abbe80eda3be280f3fb4cdd0e7924fc6d3e
4
- data.tar.gz: de207203aa5142b8c23fc80460f22c0cef765a2b
3
+ metadata.gz: 0638175e64ca888ba8bec6957939f5aa96a1414d
4
+ data.tar.gz: db3d5143898d62e1cab3a0104c121861b022aadb
5
5
  SHA512:
6
- metadata.gz: 3763a6f6d3a063acb0fabd4fcc0242500e082b587422594de49e5ade7b32bfa90a691786b32c5aa9f964785b6aa7dedfb4a1fd10e01484a3bc0d7af315d80ae1
7
- data.tar.gz: 02e3de69e62383addf244d9a42830f157eff5083e1ad7925f8cf1d9226ac3d29e2e7a900df750ffc9450cdaba5f25b7e3c25b1f16f8573f34a6152388e812466
6
+ metadata.gz: 021da3ac04ba7490056a79a941c5793297fc708835646d09699f0621a1b414645e10dbf15ab3c60ed21ca7d8c0c1a58f20b5ae6ab023cd2863dbb941d9e3ae9d
7
+ data.tar.gz: d7ba93f170d5e45b9b7f90316c61640af4d8a45f42417d54be90419ab1eb65996135ae0ce837037a8a4f2c41658b3a9cec801e0e44d0b5fd90f44edd44e45286
data/.gitignore CHANGED
@@ -7,5 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- /.idea/
11
- /.gem
10
+ /.idea/
data/lib/mellat.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "mellat/version"
2
2
  require "mellat/requisition"
3
+ require "mellat/verification"
3
4
  require "mellat/respond"
4
- require "mellat/plug/bank_name"
5
5
 
6
6
  module Mellat
7
7
 
@@ -16,8 +16,8 @@ module Mellat
16
16
 
17
17
  def refID
18
18
  @RefID.to_s
19
- end
20
19
 
20
+ end
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
@@ -0,0 +1,35 @@
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
+ # @response.validate()
30
+ return response.body
31
+ end
32
+
33
+ end
34
+
35
+ end
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.3.7.0"
3
+ VERSION = "0.1.3.7.1"
4
4
 
5
5
  end
Binary file
Binary file
Binary file
Binary file
data/mellat.gemspec CHANGED
@@ -17,7 +17,6 @@ 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']
21
20
 
22
21
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
22
  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.7.0
4
+ version: 0.1.3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-05 00:00:00.000000000 Z
11
+ date: 2016-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -24,20 +24,6 @@ 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
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rspec
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +74,7 @@ extensions: []
88
74
  extra_rdoc_files: []
89
75
  files:
90
76
  - ".gitignore"
77
+ - ".idea/vcs.xml"
91
78
  - CODE_OF_CONDUCT.md
92
79
  - Gemfile
93
80
  - LICENSE.txt
@@ -99,11 +86,15 @@ files:
99
86
  - lib/generators/mellat/install_generator.rb
100
87
  - lib/generators/templates/mellat_initializer.rb
101
88
  - lib/mellat.rb
102
- - lib/mellat/plug/bank_name.rb
103
89
  - lib/mellat/plug/unique_bank_code.rb
104
90
  - lib/mellat/requisition.rb
105
91
  - lib/mellat/respond.rb
92
+ - lib/mellat/verification.rb
106
93
  - 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
107
98
  - mellat.gemspec
108
99
  homepage: https://github.com/mm580486/mellat
109
100
  licenses:
@@ -1,23 +0,0 @@
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