mellat 0.1.3.6.8 → 0.1.3.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mellat/verification.rb +8 -15
- data/lib/mellat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35db60a843cec17e1d78b386b98982604304135a
|
4
|
+
data.tar.gz: 226cdd90243c6175be2cbaa75c73dc51e98032df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de6c8a1a89b8e83667dc72ba601bd0fb45bd2eb376b19aa10f31b152308305d3615ae32a3668178eb60264dae61af4b9cdad4f4a823666be7c8d02ab87ff15e
|
7
|
+
data.tar.gz: afd340431364948704ad7f69c58fac480cff155688624ec4254f47b13cb0e362f7ce33d4f3ffcdea9b3294023027cc29a7d22c76ba0305bf2d2aff6c75956a9e
|
data/lib/mellat/verification.rb
CHANGED
@@ -2,38 +2,31 @@ require "savon"
|
|
2
2
|
|
3
3
|
module Mellat
|
4
4
|
|
5
|
-
class
|
5
|
+
class BpVerifyRequest
|
6
6
|
attr_accessor :orderId, :amount, :localDate, :localTime, :additionalData, :payerId, :callBackUrl
|
7
7
|
attr_reader :respond
|
8
8
|
|
9
9
|
def initialize(args = {})
|
10
10
|
@orderId = args.fetch(:orderId)
|
11
|
-
@
|
12
|
-
@
|
13
|
-
@localTime = args.fetch(:localTime,Time.now.strftime("%H%M%S"))
|
14
|
-
@additionalData = args.fetch(:additionalData,' ')
|
15
|
-
@payerId = args.fetch(:payerId,0)
|
16
|
-
@callBackUrl = args.fetch(:callBackUrl,Mellat.configuration.callBackUrl)
|
11
|
+
@saleOrderId = args.fetch(:saleOrderId)
|
12
|
+
@saleReferenceId = args.fetch(:saleReferenceId)
|
17
13
|
@terminalId = Mellat.configuration.terminalId
|
18
14
|
@userName = Mellat.configuration.userName
|
19
15
|
@userPassword = Mellat.configuration.userPassword
|
20
|
-
@wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
|
21
16
|
@response = RespondBpPayRequest.new()
|
17
|
+
@wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
|
22
18
|
end
|
23
19
|
|
24
20
|
def call
|
25
|
-
response = @wsdl.call :
|
21
|
+
response = @wsdl.call :bp_verify_request, message: {
|
26
22
|
'terminalId' => @terminalId,
|
27
23
|
'userName' => @userName,
|
28
24
|
'userPassword' => @userPassword,
|
29
25
|
'orderId' => @orderId,
|
30
|
-
'
|
31
|
-
'
|
32
|
-
'localTime' => @localTime.to_s,
|
33
|
-
'additionalData' => @additionalData,
|
34
|
-
'payerId' => @payerId,
|
35
|
-
'callBackUrl' => @callBackUrl
|
26
|
+
'saleOrderId' => @saleOrderId,
|
27
|
+
'saleReferenceId'=> @saleReferenceId,
|
36
28
|
}
|
29
|
+
|
37
30
|
@response.validate(response.body)
|
38
31
|
end
|
39
32
|
|
data/lib/mellat/version.rb
CHANGED