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.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +79 -70
- data/app/assets/javascripts/spree/frontend/checkout.js +1 -0
- data/app/assets/javascripts/spree/frontend/jquery-1.12.4.min.js +5 -0
- data/app/assets/javascripts/spree/frontend/jquery.blockUI.js +620 -0
- data/app/views/spree/checkout/payment/_razorpay.html.erb +16 -17
- data/lib/generators/spree_razorpay/install/install_generator.rb +6 -0
- data/lib/spree_razorpay/version.rb +1 -1
- metadata +5 -2
@@ -1,22 +1,22 @@
|
|
1
|
-
|
2
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
5
|
+
<div id='razorpay' class='btn razorpay-payment-button pull-right'>
|
6
|
+
Pay by Razorpay
|
7
|
+
</div>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
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
|
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.
|
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:
|
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
|