mellat 0.1.3 → 0.1.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39da3efce2d9335914c5384e6dd5c956494f44ae
|
4
|
+
data.tar.gz: 6649c1abf21540e2f7faeda9d3cde2ea228cde6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55d606931ad133515d9a3fea9bd009e896a2dd5bb06da0b0bdf9daf764731084458825e592be509566e08f57de93b4c5a2c4d55fe5fe7c351344677f9f6c32bd
|
7
|
+
data.tar.gz: 57ff3aaeaed908406a6f76a29e05d2a045526c9d5a25164150222832df2ba491b87fcfa121e1a604249b296b5e7e4fa69292260668bd59b64b97c4a274a70aa6
|
@@ -7,7 +7,11 @@ module Mellat
|
|
7
7
|
def copy_initializer
|
8
8
|
template "mellat_initializer.rb", "config/initializers/mellat.rb"
|
9
9
|
|
10
|
-
|
10
|
+
puts <<~EOF
|
11
|
+
\e[36mInstall complete 👻 \e[0m
|
12
|
+
For report issues or suggest contact me on twitter: \e[32m@mm580486\e[0m
|
13
|
+
EOF
|
14
|
+
|
11
15
|
end
|
12
16
|
|
13
17
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# Depricated wsdl https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl moved to https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl
|
2
|
+
# More detail http://www.behpardakht.com/resources/files/PGW_Migration_User_Guide.pdf
|
1
3
|
Mellat.configure do |config|
|
2
|
-
config.wsdl='
|
3
|
-
config.terminalId=''
|
4
|
-
config.userName=''
|
5
|
-
config.userPassword=''
|
4
|
+
config.wsdl=''
|
5
|
+
config.terminalId=''
|
6
|
+
config.userName=''
|
7
|
+
config.userPassword=''
|
6
8
|
end
|
data/lib/mellat/requisition.rb
CHANGED
@@ -11,33 +11,32 @@ module Mellat
|
|
11
11
|
@amount = args.fetch(:amount)
|
12
12
|
@localDate = args.fetch(:localDate,Time.now.strftime("%Y%d%m"))
|
13
13
|
@localTime = args.fetch(:localTime,Time.now.strftime("%H%M%S"))
|
14
|
-
@additionalData = args.fetch(:additionalData,'')
|
15
|
-
@payerId
|
14
|
+
@additionalData = args.fetch(:additionalData,' ')
|
15
|
+
@payerId = args.fetch(:payerId,0)
|
16
16
|
@callBackUrl = args.fetch(:callBackUrl,Mellat.configuration.callBackUrl)
|
17
17
|
@terminalId = Mellat.configuration.terminalId
|
18
18
|
@userName = Mellat.configuration.userName
|
19
19
|
@userPassword = Mellat.configuration.userPassword
|
20
20
|
@wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
|
21
|
-
@response = RespondBpPayRequest.new
|
21
|
+
@response = RespondBpPayRequest.new()
|
22
22
|
end
|
23
23
|
|
24
24
|
def call
|
25
25
|
response = @wsdl.call :bp_pay_request, message: {
|
26
|
-
'
|
27
|
-
'
|
28
|
-
'
|
26
|
+
'terminalId' => @terminalId,
|
27
|
+
'userName' => @userName,
|
28
|
+
'userPassword' => @userPassword,
|
29
29
|
'orderId' => @orderId,
|
30
30
|
'amount' => @amount,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
'
|
35
|
-
'
|
31
|
+
'localDate' => @localDate.to_s,
|
32
|
+
'localTime' => @localTime.to_s,
|
33
|
+
'additionalData' => @additionalData,
|
34
|
+
'payerId' => @payerId,
|
35
|
+
'callBackUrl' => @callBackUrl
|
36
36
|
}
|
37
37
|
@response.validate(response.body)
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
41
41
|
|
42
|
-
|
43
42
|
end
|
data/lib/mellat/respond.rb
CHANGED
data/lib/mellat/version.rb
CHANGED
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.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: 2016-12-
|
11
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|