mellat 0.1.3.6.8 → 0.1.3.6.9

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: 8f5c6f5f4c5c00c944836d9a61b5227d861ee0ec
4
- data.tar.gz: c5099071195f670c464efdb98ccbd7fe2960fb89
3
+ metadata.gz: 35db60a843cec17e1d78b386b98982604304135a
4
+ data.tar.gz: 226cdd90243c6175be2cbaa75c73dc51e98032df
5
5
  SHA512:
6
- metadata.gz: 176986fd190ce601b8d80bb73940f0c1979993460fb6337799f5ef0fc3cc88feb20d9ee0f101659636ea5a3641168485d3e0ef50887cdc67d61639bfea21e42a
7
- data.tar.gz: 9b5cdf637e60cec664e8de54be8074380a6f14ddf5dd9d9a6f9f9a4e0e1142833444bd78779c51cfd96542bc6907f416aafcfd4b25b59eb52735c3e4b0c1cdc4
6
+ metadata.gz: 5de6c8a1a89b8e83667dc72ba601bd0fb45bd2eb376b19aa10f31b152308305d3615ae32a3668178eb60264dae61af4b9cdad4f4a823666be7c8d02ab87ff15e
7
+ data.tar.gz: afd340431364948704ad7f69c58fac480cff155688624ec4254f47b13cb0e362f7ce33d4f3ffcdea9b3294023027cc29a7d22c76ba0305bf2d2aff6c75956a9e
@@ -2,38 +2,31 @@ require "savon"
2
2
 
3
3
  module Mellat
4
4
 
5
- class BpPayVerification
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
- @amount = args.fetch(:amount)
12
- @localDate = args.fetch(:localDate,Time.now.strftime("%Y%d%m"))
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 :bp_pay_request, message: {
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
- 'amount' => @amount,
31
- 'localDate' => @localDate.to_s,
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
 
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.3.6.8"
3
+ VERSION = "0.1.3.6.9"
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.6.8
4
+ version: 0.1.3.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi