mellat 0.1.3.6.9 → 0.1.3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/mellat.rb +1 -1
- data/lib/mellat/plug/bank_name.rb +23 -0
- data/lib/mellat/respond.rb +2 -2
- data/lib/mellat/version.rb +1 -1
- data/mellat.gemspec +1 -0
- metadata +17 -8
- data/lib/mellat/verification.rb +0 -35
- data/mellat-0.1.3.2.gem +0 -0
- data/mellat-0.1.3.3.gem +0 -0
- data/mellat-0.1.3.4.gem +0 -0
- data/mellat-0.1.3.5.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14da1abbe80eda3be280f3fb4cdd0e7924fc6d3e
|
4
|
+
data.tar.gz: de207203aa5142b8c23fc80460f22c0cef765a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3763a6f6d3a063acb0fabd4fcc0242500e082b587422594de49e5ade7b32bfa90a691786b32c5aa9f964785b6aa7dedfb4a1fd10e01484a3bc0d7af315d80ae1
|
7
|
+
data.tar.gz: 02e3de69e62383addf244d9a42830f157eff5083e1ad7925f8cf1d9226ac3d29e2e7a900df750ffc9450cdaba5f25b7e3c25b1f16f8573f34a6152388e812466
|
data/.gitignore
CHANGED
data/lib/mellat.rb
CHANGED
@@ -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
|
data/lib/mellat/respond.rb
CHANGED
data/lib/mellat/version.rb
CHANGED
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.
|
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:
|
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:
|
data/lib/mellat/verification.rb
DELETED
@@ -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
|