mellat 0.1.3.5 → 0.1.3.6

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: 0c5aef6f18c45d86ab43fdddf86c4e69455f2a2d
4
- data.tar.gz: e6a32987ba3c724ec12513778d137d69689dcc02
3
+ metadata.gz: 99e672d6181023e5d5c65a5e8629fc12977a46d4
4
+ data.tar.gz: ddcc93bf91f86e83e612a7a52522930c890fe4b1
5
5
  SHA512:
6
- metadata.gz: 6422c2a2e8b959d98d1a522ebe75b5d67eba1b5620c223d479b2a75789f45a129a123c4d41541304b1abbf6bebdc50801509f133cb8915a9c213071ac304aa21
7
- data.tar.gz: 490c23a718816fc2dc58376612ae84c10f41d307752a1fa14ec529c459a741513618b116e5a0946acc416512f71b45b42e8ebe960e89384372b927e022d0d0da
6
+ metadata.gz: 0d493bb302f284ff6ad8c14f8a186e32dfb618b38e8d976d04c079909eb5b9047ae7641a40fb6e4cd93701c15dac370d4c5b463ac14808d227d8a16cdcd75151
7
+ data.tar.gz: 57f189c91a80875e6bb56f6d5d76fdd2c97ae8fe8b799dca069f11fbe5c830281fe3677b3f388d0c865e419fd8fca30e439d2f40e6fbfa480d80a961ef400a27
@@ -1,4 +1,4 @@
1
-
1
+ <script type="text/javascript" charset="utf-8">
2
2
  function postRefId (refIdValue) {
3
3
  var form = document.createElement('form');
4
4
  form.setAttribute('method', 'POST');
@@ -13,4 +13,7 @@ function postRefId (refIdValue) {
13
13
  document.body.removeChild(form);
14
14
  }
15
15
 
16
- postRefId('<%= @RefID %>')
16
+ postRefId('<%= @RefID %>')
17
+ </script>
18
+
19
+
@@ -2,16 +2,16 @@ module Mellat
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path("../../templates", __FILE__)
5
- desc "Creates Jem initializer for your application"
5
+ desc "Creates Mellat initializer for your application"
6
6
 
7
7
  def copy_initializer
8
8
  template "mellat_initializer.rb", "config/initializers/mellat.rb"
9
9
 
10
+
10
11
  puts <<~EOF
11
12
  \e[36mInstall complete 👻 \e[0m
12
13
  For report issues or suggest contact me on twitter: \e[32m@mm580486\e[0m
13
14
  EOF
14
-
15
15
  end
16
16
 
17
17
  end
@@ -8,16 +8,16 @@ module Mellat
8
8
 
9
9
  def initialize(args = {})
10
10
  @orderId = args.fetch(:orderId)
11
- @amount = args.fetch(:amount)
11
+ @amount = args.fetch(:amount)
12
12
  @localDate = args.fetch(:localDate,Time.now.strftime("%Y%d%m"))
13
- @localTime = args.fetch(:localTime,Time.now.strftime("%H%M%S"))
13
+ @localTime = args.fetch(:localTime,Time.now.strftime("%H%M%S"))
14
14
  @additionalData = args.fetch(:additionalData,' ')
15
- @payerId = args.fetch(:payerId,0)
16
- @callBackUrl = args.fetch(:callBackUrl,Mellat.configuration.callBackUrl)
17
- @terminalId = Mellat.configuration.terminalId
18
- @userName = Mellat.configuration.userName
19
- @userPassword = Mellat.configuration.userPassword
20
- @wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
15
+ @payerId = args.fetch(:payerId,0)
16
+ @callBackUrl = args.fetch(:callBackUrl,Mellat.configuration.callBackUrl)
17
+ @terminalId = Mellat.configuration.terminalId
18
+ @userName = Mellat.configuration.userName
19
+ @userPassword = Mellat.configuration.userPassword
20
+ @wsdl = Savon.client(wsdl: Mellat.configuration.wsdl, pretty_print_xml: true,namespace: 'http://interfaces.core.sw.bps.com/')
21
21
  @response = RespondBpPayRequest.new()
22
22
  end
23
23
 
@@ -2,7 +2,6 @@ module Mellat
2
2
 
3
3
  class RespondBpPayRequest
4
4
  attr_reader :respond, :status,:statusmessage
5
- include AbstractController::Rendering
6
5
  def validate(response = nil)
7
6
  @response = response
8
7
  perform_validation
@@ -13,18 +12,16 @@ module Mellat
13
12
  @valid
14
13
  end
15
14
 
16
- def redirect_to_pay
17
- render text: 'ok'
18
- # js: "vendor/assets/javascripts/bp-pay"
15
+ def refID
16
+ @RefID.to_s
19
17
  end
20
-
21
-
18
+
22
19
  private
23
20
 
24
21
  def perform_validation
25
22
  raise ArgumentError, 'not a valid response' if @response.nil?
26
23
  @status = @response[:bp_pay_request_response][:return]
27
- @valid = (@status.split(',')[0].to_i==0)
24
+ @valid = (@status.split(',')[0]==0)
28
25
  @RefID = @status.split(',')[1] if @valid
29
26
  end
30
27
 
@@ -1,3 +1,3 @@
1
1
  module Mellat
2
- VERSION = "0.1.3.5"
2
+ VERSION = "0.1.3.6"
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.5
4
+ version: 0.1.3.6
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-08 00:00:00.000000000 Z
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -79,6 +79,7 @@ files:
79
79
  - LICENSE.txt
80
80
  - README.md
81
81
  - Rakefile
82
+ - app/views/mellat/bp-pay.html.erb
82
83
  - bin/console
83
84
  - bin/setup
84
85
  - lib/generators/mellat/install_generator.rb
@@ -92,7 +93,6 @@ files:
92
93
  - mellat-0.1.3.1.gem
93
94
  - mellat-0.1.3.gem
94
95
  - mellat.gemspec
95
- - vendor/assets/javascripts/bp-pay.js.erb
96
96
  homepage: https://github.com/mm580486/mellat
97
97
  licenses:
98
98
  - MIT