mellat 0.1.3.7.4 → 0.1.3.7.5
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 +4 -4
- data/lib/mellat/verification.rb +3 -5
- data/lib/mellat/verify_rquest_respond.rb +3 -3
- 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: 29a66deb91ca122f41d4d22057c18a1e67c0c290
|
4
|
+
data.tar.gz: 5ba94e79d9ca1543b6cacec7377663a14c53022f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc26fd641c3193aa8394ad52ecf8e7c06893700be15eab69ccc69d00fe0fe896143958da50bc608f13c9ec805a82cf90399907716c10ac954e6fef10f3291f5
|
7
|
+
data.tar.gz: 3fa71e5f2680afbd9fec3d24ae94fd3b13801f832fe4285d7faea4b0459aa58c177f4a6b80df693658bb2787ca9772884e5990092cc1a406e250c3e7e8359723
|
data/lib/mellat/verification.rb
CHANGED
@@ -3,7 +3,7 @@ require "savon"
|
|
3
3
|
module Mellat
|
4
4
|
|
5
5
|
class BpVerifyRequest
|
6
|
-
attr_accessor :orderId, :saleOrderId, :saleReferenceId
|
6
|
+
attr_accessor :orderId, :saleOrderId, :saleReferenceId,:status
|
7
7
|
attr_reader :respond
|
8
8
|
|
9
9
|
def initialize(args = {})
|
@@ -13,8 +13,9 @@ module Mellat
|
|
13
13
|
@terminalId = Mellat.configuration.terminalId
|
14
14
|
@userName = Mellat.configuration.userName
|
15
15
|
@userPassword = Mellat.configuration.userPassword
|
16
|
-
@response = RespondBpPayVerificationRequest.new()
|
17
16
|
@wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
|
17
|
+
@response = RespondBpPayVerificationRequest.new()
|
18
|
+
|
18
19
|
end
|
19
20
|
|
20
21
|
def call
|
@@ -26,13 +27,10 @@ module Mellat
|
|
26
27
|
'saleOrderId' => @saleOrderId,
|
27
28
|
'saleReferenceId'=> @saleReferenceId,
|
28
29
|
}
|
29
|
-
|
30
30
|
@response.validate(response.body)
|
31
|
-
|
32
31
|
end
|
33
32
|
|
34
33
|
def bpSettleRequest
|
35
|
-
|
36
34
|
response = @wsdl.call :bp_settle_request, message: {
|
37
35
|
'terminalId' => @terminalId,
|
38
36
|
'userName' => @userName,
|
@@ -2,7 +2,7 @@ module Mellat
|
|
2
2
|
|
3
3
|
class RespondBpPayVerificationRequest
|
4
4
|
|
5
|
-
attr_reader :respond, :status,:statusmessage
|
5
|
+
attr_reader :respond, :status,:statusmessage,:status_settle
|
6
6
|
def validate(response = nil)
|
7
7
|
@response = response
|
8
8
|
perform_validation
|
@@ -27,10 +27,10 @@ module Mellat
|
|
27
27
|
@valid = (@status.to_i==0)
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
30
|
+
def perform_validation_settle
|
31
31
|
raise ArgumentError, 'not a valid response' if @response.nil?
|
32
32
|
@status = @response[:bp_settle_request_response][:return]
|
33
|
-
@valid = (@status.to_i==
|
33
|
+
@valid = (@status.to_i==45)
|
34
34
|
end
|
35
35
|
|
36
36
|
|
data/lib/mellat/version.rb
CHANGED