mellat 0.1.3.7.1 → 0.1.3.7.2

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: 0638175e64ca888ba8bec6957939f5aa96a1414d
4
- data.tar.gz: db3d5143898d62e1cab3a0104c121861b022aadb
3
+ metadata.gz: 3b5d800aa9dffec7a70bfd8e6bf2d78933d357dd
4
+ data.tar.gz: e63412beb767728a2304879258c8437aab100ea5
5
5
  SHA512:
6
- metadata.gz: 021da3ac04ba7490056a79a941c5793297fc708835646d09699f0621a1b414645e10dbf15ab3c60ed21ca7d8c0c1a58f20b5ae6ab023cd2863dbb941d9e3ae9d
7
- data.tar.gz: d7ba93f170d5e45b9b7f90316c61640af4d8a45f42417d54be90419ab1eb65996135ae0ce837037a8a4f2c41658b3a9cec801e0e44d0b5fd90f44edd44e45286
6
+ metadata.gz: 283de71bfbbb16c8e968cc129a0f1a5673b70c66ea63b10ed83841ef3af013e5b9cd90101f976b6a22b2752b612004d226cea243bb5a2f2a29dab741cd4d00e2
7
+ data.tar.gz: 9e5de3e3ab8e75bae0c779fa92058e2b45fa58ff20c083d88d7521f1c9d9dd6e7f1975a726dc05dad036c797d63f7b4b9d78ab23035e083b40ee2f7d958a90e8
data/lib/mellat.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "mellat/version"
2
2
  require "mellat/requisition"
3
3
  require "mellat/verification"
4
+ require 'mellat/verify_rquest_respond'
4
5
  require "mellat/respond"
5
6
 
6
7
  module Mellat
@@ -13,7 +13,7 @@ module Mellat
13
13
  @terminalId = Mellat.configuration.terminalId
14
14
  @userName = Mellat.configuration.userName
15
15
  @userPassword = Mellat.configuration.userPassword
16
- @response = RespondBpPayRequest.new()
16
+ @response = RespondBpPayVerificationRequest.new()
17
17
  @wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
18
18
  end
19
19
 
@@ -26,8 +26,9 @@ module Mellat
26
26
  'saleOrderId' => @saleOrderId,
27
27
  'saleReferenceId'=> @saleReferenceId,
28
28
  }
29
- # @response.validate()
30
- return response.body
29
+
30
+ @response.validate(response.body)
31
+
31
32
  end
32
33
 
33
34
  end
@@ -0,0 +1,30 @@
1
+ module Mellat
2
+
3
+ class RespondBpPayVerificationRequest
4
+
5
+ attr_reader :respond, :status,:statusmessage
6
+ def validate(response = nil)
7
+ @response = response
8
+ perform_validation
9
+ return self
10
+ end
11
+
12
+ def valid?
13
+ end
14
+
15
+
16
+ def refID
17
+
18
+
19
+ end
20
+ private
21
+
22
+ def perform_validation
23
+ raise ArgumentError, 'not a valid response' if @response.nil?
24
+ @status = @response[:bp_verify_request_response][:return]
25
+
26
+ end
27
+
28
+ end
29
+
30
+ end
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.3.7.1"
3
+ VERSION = "0.1.3.7.2"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mellat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.7.1
4
+ version: 0.1.3.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
@@ -90,6 +90,7 @@ files:
90
90
  - lib/mellat/requisition.rb
91
91
  - lib/mellat/respond.rb
92
92
  - lib/mellat/verification.rb
93
+ - lib/mellat/verify_rquest_respond.rb
93
94
  - lib/mellat/version.rb
94
95
  - mellat-0.1.3.2.gem
95
96
  - mellat-0.1.3.3.gem