spree_razorpay 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +1,22 @@
1
- <script src="https://checkout.razorpay.com/v1/checkout.js"></script>
2
- <script src="http://malsup.github.io/jquery.blockUI.js"></script>
1
+ <%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" %>
2
+ <%= javascript_include_tag "https://checkout.razorpay.com/v1/checkout.js" %>
3
+ <%= javascript_include_tag "http://malsup.github.io/jquery.blockUI.js" %>
3
4
 
4
- <div id='razorpay' class='btn razorpay-payment-button pull-right'>
5
- Pay by Razorpay
6
- </div>
5
+ <div id='razorpay' class='btn razorpay-payment-button pull-right'>
6
+ Pay by Razorpay
7
+ </div>
7
8
 
8
- <div id='blockUI-message' style='display: none;'>
9
- <h1>
10
- <b>HOLDON!</b>
11
- While we connect you back to merchant's site
12
- </h1>
13
- </div>
9
+ <div id='blockUI-message' style='display: none;'>
10
+ <h1>
11
+ <b>HOLDON!</b>
12
+ While we connect you back to merchant's site
13
+ </h1>
14
+ </div>
14
15
 
15
- <script>
16
- $(document).ready(function(){
17
-
18
- $("#razorpay").click(function() {
19
- var options = {
16
+ <script type="text/javascript">
17
+ $(document).ready(function(){
18
+ $("#razorpay").click(function() {
19
+ var options = {
20
20
  "key": "<%= payment_method.preferences[:key_id] %>",
21
21
  "amount": "<%= current_order.amount_in_paise %>",
22
22
  'name': "<%= payment_method.preferences[:merchant_name] %>",
@@ -51,6 +51,5 @@ $(document).ready(function(){
51
51
  var rzp1 = new Razorpay(options);
52
52
  rzp1.open();
53
53
  });
54
-
55
54
  });
56
55
  </script>
@@ -4,6 +4,12 @@ module SpreeRazorpay
4
4
 
5
5
  class_option :auto_run_migrations, :type => :boolean, :default => false
6
6
 
7
+ def add_javascripts
8
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/jquery-1.12.4.min.js\n"
9
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/checkout.js\n"
10
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/jquery.blockUI.js\n"
11
+ end
12
+
7
13
  def add_stylesheets
8
14
  if File.exists?('vendor/assets/stylesheets/spree/frontend/all.css')
9
15
  inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/razorpay\n", :before => /\*\//, :verbose => true
@@ -1,3 +1,3 @@
1
1
  module SpreeRazorpay
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_razorpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Kumar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-29 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -97,6 +97,9 @@ files:
97
97
  - README.md
98
98
  - Rakefile
99
99
  - app/assets/images/PayWithRzp.png
100
+ - app/assets/javascripts/spree/frontend/checkout.js
101
+ - app/assets/javascripts/spree/frontend/jquery-1.12.4.min.js
102
+ - app/assets/javascripts/spree/frontend/jquery.blockUI.js
100
103
  - app/assets/stylesheets/spree/razorpay.scss
101
104
  - app/controllers/spree/razorpay_controller.rb
102
105
  - app/models/spree/gateway/razorpay_gateway.rb