mellat 0.1.3 → 0.1.3.1

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: db46ddf80381c42b0c823e9719d8032c68c066d7
4
- data.tar.gz: a6d2fb8703d4de9067be90ff6b5034b1a74a25cd
3
+ metadata.gz: 39da3efce2d9335914c5384e6dd5c956494f44ae
4
+ data.tar.gz: 6649c1abf21540e2f7faeda9d3cde2ea228cde6b
5
5
  SHA512:
6
- metadata.gz: 45a41aeb6116d52bd0e115368f82b09897e624095b5686f21fc6e6fb5c146578dfc48eb2ed52335cdf930691a8a605533c417110c58e61b24b489cc95ca495af
7
- data.tar.gz: 5c0333580f31bcfd1bca073709122d83be16b8997f726253b2d67e9a6fbc9f13b647e16061b950ec296c557b47ac8fe4a4bbeb2dce8075852b78a4fcbefc2336
6
+ metadata.gz: 55d606931ad133515d9a3fea9bd009e896a2dd5bb06da0b0bdf9daf764731084458825e592be509566e08f57de93b4c5a2c4d55fe5fe7c351344677f9f6c32bd
7
+ data.tar.gz: 57ff3aaeaed908406a6f76a29e05d2a045526c9d5a25164150222832df2ba491b87fcfa121e1a604249b296b5e7e4fa69292260668bd59b64b97c4a274a70aa6
@@ -7,7 +7,11 @@ module Mellat
7
7
  def copy_initializer
8
8
  template "mellat_initializer.rb", "config/initializers/mellat.rb"
9
9
 
10
- puts "Install complete! Truly Outrageous!"
10
+ puts <<~EOF
11
+ \e[36mInstall complete 👻 \e[0m
12
+ For report issues or suggest contact me on twitter: \e[32m@mm580486\e[0m
13
+ EOF
14
+
11
15
  end
12
16
 
13
17
  end
@@ -1,6 +1,8 @@
1
+ # Depricated wsdl https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl moved to https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl
2
+ # More detail http://www.behpardakht.com/resources/files/PGW_Migration_User_Guide.pdf
1
3
  Mellat.configure do |config|
2
- config.wsdl='https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl'
3
- config.terminalId=''
4
- config.userName=''
5
- config.userPassword=''
4
+ config.wsdl=''
5
+ config.terminalId=''
6
+ config.userName=''
7
+ config.userPassword=''
6
8
  end
@@ -11,33 +11,32 @@ module Mellat
11
11
  @amount = args.fetch(:amount)
12
12
  @localDate = args.fetch(:localDate,Time.now.strftime("%Y%d%m"))
13
13
  @localTime = args.fetch(:localTime,Time.now.strftime("%H%M%S"))
14
- @additionalData = args.fetch(:additionalData,'')
15
- @payerId = args.fetch(:payerId)
14
+ @additionalData = args.fetch(:additionalData,' ')
15
+ @payerId = args.fetch(:payerId,0)
16
16
  @callBackUrl = args.fetch(:callBackUrl,Mellat.configuration.callBackUrl)
17
17
  @terminalId = Mellat.configuration.terminalId
18
18
  @userName = Mellat.configuration.userName
19
19
  @userPassword = Mellat.configuration.userPassword
20
20
  @wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
21
- @response = RespondBpPayRequest.new
21
+ @response = RespondBpPayRequest.new()
22
22
  end
23
23
 
24
24
  def call
25
25
  response = @wsdl.call :bp_pay_request, message: {
26
- 'terminal_id' => @terminalId,
27
- 'user_name' => @userName,
28
- 'user_password' => @userPassword,
26
+ 'terminalId' => @terminalId,
27
+ 'userName' => @userName,
28
+ 'userPassword' => @userPassword,
29
29
  'orderId' => @orderId,
30
30
  'amount' => @amount,
31
- # 'localDate' => @localDate,
32
- # 'localTime' => @localTime,
33
- # 'additionalData' => @message,
34
- 'payer_id' => @payerId,
35
- 'call_back_url' => @callBackUrl
31
+ 'localDate' => @localDate.to_s,
32
+ 'localTime' => @localTime.to_s,
33
+ 'additionalData' => @additionalData,
34
+ 'payerId' => @payerId,
35
+ 'callBackUrl' => @callBackUrl
36
36
  }
37
37
  @response.validate(response.body)
38
38
  end
39
39
 
40
40
  end
41
41
 
42
-
43
42
  end
@@ -21,7 +21,6 @@ module Mellat
21
21
 
22
22
  end
23
23
 
24
-
25
24
  end
26
25
 
27
26
 
@@ -1,3 +1,3 @@
1
1
  module Mellat
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mellat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-06 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon