spree_razorpay_checkout 0.0.3 → 0.0.5

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
  SHA256:
3
- metadata.gz: 94a31b1b31edbc5d2fd0e235dfd6a9ad25c522eec61b60e823743fb2f8adfedf
4
- data.tar.gz: ab2242351bd962dd2804d32f37359e93e3e5d378e091050388c0665549bf7fc8
3
+ metadata.gz: e1951bcb23b0a2a7f766cd926211440f923b40e50d976e72677893e0332de40d
4
+ data.tar.gz: bc343c46c13893807e544e168ae9f8899fba0de37b691092402d5e03b096d7e7
5
5
  SHA512:
6
- metadata.gz: a731e63444ba3c7e13128ba6150fd1943527941fd1dd4a82adf7079f7e2153ed72b8e31fe18645c856eea1b9a8ac1fbee8689205667cb83d263d1b6cbc3c6cd6
7
- data.tar.gz: b7deacba1188585b876e848f5593a0d58c0b3b69f25d83260fb0bc3ae939e4e0f2d5a0971f3d528dea2ca03090b8635ab581bad979cb4c6fb45bbe7d69137d3a
6
+ metadata.gz: e990f2c51d6cca246939f0ea33af1c44f2949631c013cf2b738d1cf445e19f7605475580c25e9262c1aab1fb5fc639a7a33d1295bd5b18fe5eb308d5c9387ac6
7
+ data.tar.gz: 7d6706c9ca2afea782a7ffd60bb6441e38ca6fc79f885eff2730f95d52734540515dccc22a46b5074ef7eb261f49034f4831b794bc050b38977ffffe037933d8
data/README.md ADDED
@@ -0,0 +1,119 @@
1
+ <img
2
+ src="https://github.com/user-attachments/assets/3bcca1bd-5d70-4f0e-9c6d-4f99104d0e93"
3
+ alt="razorpay"
4
+ style="height: 100px; border-radius: 12em;"
5
+ />
6
+
7
+ ## Razorpay Extension for Spree Commerce v5
8
+ RazorPay is the only payments solution in India that allows businesses to accept, process and disburse payments with its product suite.
9
+
10
+ ## Installation (Traditional)
11
+
12
+ 1. Add this to your Gemfile with this line:
13
+
14
+ ```ruby
15
+ gem 'spree_razorpay_checkout'
16
+ ```
17
+
18
+ 2. Install the Gem using Bundle Install:
19
+
20
+ ```ruby
21
+ bundle install
22
+ ```
23
+
24
+ 3. Copy & Run Migrations:
25
+
26
+ ```ruby
27
+ bundle exec rails g spree_razorpay_checkout:install
28
+ ```
29
+
30
+ 4. Compile Assests for Proper Images & JS loading:
31
+
32
+ ```ruby
33
+ RAILS_ENV=development bin/rails assets:precompile
34
+ ```
35
+
36
+ 5. Start Server:
37
+
38
+ ```ruby
39
+ foreman start -f Procfile.dev
40
+ ```
41
+
42
+ ## Installation (For Docker)
43
+
44
+ 1. Add this your Gemfile with this line:
45
+
46
+ ```ruby
47
+ gem 'spree_razorpay_checkout'
48
+ ```
49
+
50
+ 2. Install the Gem using Docker's Bundle Install:
51
+
52
+ ```ruby
53
+ docker compose run web bundle install
54
+ ```
55
+
56
+ 3. Run Install Generator to Copy Migrations in Docker way:
57
+
58
+ ```ruby
59
+ docker compose run web bundle exec rails g spree_razorpay_checkout:install
60
+ ```
61
+
62
+ 4. Compile Assests for Razorpay logo & assets (Recommended):
63
+
64
+ ```ruby
65
+ docker compose run web bundle exec rails assets:precompile
66
+ ```
67
+
68
+ 5. Re-Start Server (Recommended):
69
+
70
+ ```ruby
71
+ docker compose down
72
+ docker compose up -d
73
+ ```
74
+
75
+ ## Plugin Configuration
76
+ 6. Get keys from Razorpay Dashboard [here](https://dashboard.razorpay.com/app/website-app-settings/api-keys).
77
+
78
+ <img width="1186" height="735" alt="razorpay dashboard" src="https://github.com/user-attachments/assets/f390685d-550b-4814-8785-4fcc32746f15" />
79
+
80
+ 7. Make Sure to include both Razorpay Live & Test Keys from Razorpay Dashboard:
81
+
82
+ <img width="1121" height="736" alt="Admin Dashboard - Razorpay Plugin" src="https://github.com/user-attachments/assets/f45efc43-b1db-4c79-9ad3-e3d672014676" />
83
+
84
+
85
+ 8. Drag Razorpay to Top in Payment Methods to make it Default:
86
+
87
+ <img width="1121" height="726" alt="Payment Methods - Razorpay Plugin" src="https://github.com/user-attachments/assets/8e39086d-85a6-42a2-b9fb-75299044e6d6" />
88
+
89
+ ## Checkout View
90
+
91
+ 9. Checkout Page:
92
+
93
+ <img width="507" height="639" alt="Razorpay Checkout Page" src="https://github.com/user-attachments/assets/ddca8536-fa94-4502-96fa-4cd2219f3c17" />
94
+
95
+ 10. Razorpay Modal to Capture Payments:
96
+
97
+ <img width="767" height="728" alt="Razorpay Modal" src="https://github.com/user-attachments/assets/da83105f-8510-44ae-ac7c-28960cf3a0b3" />
98
+
99
+ 11. Order Page (Customer View):
100
+
101
+ <img width="863" height="733" alt="Razorpay in Order Page Client" src="https://github.com/user-attachments/assets/51b80fe6-4007-4223-b978-8ce65a3238de" />
102
+
103
+ 12. Order Page (Admin View):
104
+
105
+ <img width="820" height="543" alt="Admin Orders Page Razorpay" src="https://github.com/user-attachments/assets/6d95d1ab-83a0-4ad8-9528-353cc7315630" />
106
+
107
+ Thankyou for supporting this plugin. if you find any issues related to plugin you are open to contribute and support which can help more Spree users in India.
108
+
109
+ ## Gem Info
110
+
111
+ - [RubyGems Page](https://rubygems.org/gems/spree_razorpay_checkout)
112
+ - [Source Code](https://github.com/umeshravani/spree_razorpay)
113
+ - [Bug Reports](https://github.com/umeshravani/spree_razorpay/issues)
114
+
115
+ ---
116
+
117
+ ### Contributing
118
+
119
+ Contributions are welcome! Please open issues or submit pull requests to help improve this plugin for the Spree + Razorpay community in India.
@@ -0,0 +1,25 @@
1
+ module SpreeRazorpayCheckout
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('templates', __dir__) # if you use templates
5
+ class_option :migrate, type: :boolean, default: true
6
+
7
+ def add_javascripts
8
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_razorpay\n"
9
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/process_razorpay\n"
10
+ end
11
+
12
+ def add_migrations
13
+ run 'bin/rails railties:install:migrations FROM=spree_razorpay_checkout'
14
+ end
15
+
16
+ def run_migrations
17
+ if options[:migrate]
18
+ run 'bin/rails db:migrate'
19
+ else
20
+ say_status :skip, "Skipped running migrations. You can run them later with `bin/rails db:migrate`.", :yellow
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,29 @@
1
+ module SpreeRazorpayCheckout
2
+ class Engine < Rails::Engine
3
+ require 'spree/core'
4
+ isolate_namespace Spree
5
+ engine_name 'spree_razorpay_checkout'
6
+
7
+ # use rspec for tests
8
+ config.generators do |g|
9
+ g.test_framework :rspec
10
+ end
11
+
12
+ config.after_initialize do |_app|
13
+ SpreeRazorpayCheckout::Config = SpreeRazorpayCheckout::Configuration.new
14
+ end
15
+
16
+ def self.activate
17
+ Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
18
+ Rails.configuration.cache_classes ? require(c) : load(c)
19
+ end
20
+ end
21
+
22
+ config.after_initialize do |app|
23
+ app.config.spree.payment_methods ||= []
24
+ app.config.spree.payment_methods << ::Spree::Gateway::RazorpayGateway
25
+ end
26
+
27
+ config.to_prepare(&method(:activate).to_proc)
28
+ end
29
+ end
@@ -0,0 +1,6 @@
1
+ FactoryBot.define do
2
+ # Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them.
3
+ #
4
+ # Example adding this to your spec_helper will load these Factories for use:
5
+ # require 'spree_razorpay/factories'
6
+ end
@@ -0,0 +1,11 @@
1
+ module SpreeRazorpayCheckout
2
+ VERSION = '0.0.5'.freeze
3
+
4
+ module_function
5
+
6
+ # Returns the version of the currently loaded SpreeRazorpay as a
7
+ # <tt>Gem::Version</tt>.
8
+ def version
9
+ Gem::Version.new VERSION
10
+ end
11
+ end
@@ -0,0 +1,4 @@
1
+ require 'spree_core'
2
+ require 'spree_extension'
3
+ require 'spree_razorpay_checkout/engine'
4
+ require 'spree_razorpay_checkout/version'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_razorpay_checkout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umesh Ravani
@@ -100,7 +100,13 @@ email:
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
- files: []
103
+ files:
104
+ - README.md
105
+ - lib/generators/spree_razorpay_checkout/install/install_generator.rb
106
+ - lib/spree_razorpay_checkout.rb
107
+ - lib/spree_razorpay_checkout/engine.rb
108
+ - lib/spree_razorpay_checkout/factories.rb
109
+ - lib/spree_razorpay_checkout/version.rb
104
110
  homepage: https://github.com/umeshravani/spree_razorpay
105
111
  licenses:
106
112
  - BSD-3-Clause