mellat 0.1.3.7.4 → 0.1.3.7.5

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: 5142f4151ff0a605ef944522d82b0c0a229f034b
4
- data.tar.gz: e0875a3c5532a78651be87da14afe9360d5f34c5
3
+ metadata.gz: 29a66deb91ca122f41d4d22057c18a1e67c0c290
4
+ data.tar.gz: 5ba94e79d9ca1543b6cacec7377663a14c53022f
5
5
  SHA512:
6
- metadata.gz: 57c600b91e9b936639875332d35d83ae7f6aade43481044f10e87fdddae43a95bab7cbe86253ce0d05929e1e97ba4cd5ed4c987b749141c0742424950f0957d7
7
- data.tar.gz: 110474527bcabe529e3782e3cdc4e9e7e38a6f444be9e2dabbcc993321b918e148fb66c2ff9a95d727cbe4470c002a1ff18130735c3dc58582ede207a123b3bf
6
+ metadata.gz: 7bc26fd641c3193aa8394ad52ecf8e7c06893700be15eab69ccc69d00fe0fe896143958da50bc608f13c9ec805a82cf90399907716c10ac954e6fef10f3291f5
7
+ data.tar.gz: 3fa71e5f2680afbd9fec3d24ae94fd3b13801f832fe4285d7faea4b0459aa58c177f4a6b80df693658bb2787ca9772884e5990092cc1a406e250c3e7e8359723
@@ -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 perform_validation
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==0)
33
+ @valid = (@status.to_i==45)
34
34
  end
35
35
 
36
36
 
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.3.7.4"
3
+ VERSION = "0.1.3.7.5"
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.4
4
+ version: 0.1.3.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi