payify 0.1.14 → 0.1.15
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56393fe8599705be8631aa24680881d1616eff58126f505c3e8063a70045b2cc
|
4
|
+
data.tar.gz: cc9b67d908c7d8161c511b95293b4e1597a9b082883a814811af9ce1cc3b4304
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26af2fe3d5005bce70b1e2d886faa159b63a536dfe17d229beb9027e9feda17e0e49610c56987350a0b485d4a128d805c01219f5ea622961a6fde7045d56b3d
|
7
|
+
data.tar.gz: 1a27db9b14f7d0e90fa9df15270dd77d1a0eb23570f9640c0ff230c512c5ee1e909677abb53bc4f27410a44057f9a2033fecdaa140fab5b5cf66024be763aee7
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Payify
|
2
|
+
module PaymentsControllerConcern
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_action :set_object, only: %i[new complete]
|
7
|
+
end
|
8
|
+
|
9
|
+
def new
|
10
|
+
@payment.stripe_init_intent
|
11
|
+
|
12
|
+
respond_to do |format|
|
13
|
+
format.html
|
14
|
+
format.json { render json: @payment }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def complete
|
19
|
+
@payment.stripe_confirm_payment unless @payment.paid?
|
20
|
+
|
21
|
+
respond_to do |format|
|
22
|
+
format.html
|
23
|
+
format.json { render json: @payment }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def set_object
|
30
|
+
@payment = Payment.find(params[:id])
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -1,29 +1,5 @@
|
|
1
1
|
module Payify
|
2
2
|
class PaymentsController < ActionController::Base
|
3
|
-
|
4
|
-
|
5
|
-
def new
|
6
|
-
@payment.stripe_init_intent
|
7
|
-
|
8
|
-
respond_to do |format|
|
9
|
-
format.html
|
10
|
-
format.json { render json: @payment }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def complete
|
15
|
-
@payment.stripe_confirm_payment unless @payment.paid?
|
16
|
-
|
17
|
-
respond_to do |format|
|
18
|
-
format.html
|
19
|
-
format.json { render json: @payment }
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def set_object
|
26
|
-
@payment = Payment.find(params[:id])
|
27
|
-
end
|
3
|
+
include ::Payify::PaymentsControllerConcern
|
28
4
|
end
|
29
5
|
end
|
data/lib/payify/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Lopez
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- app/assets/images/payify/screenshot.png
|
80
80
|
- app/assets/images/payify/vat.png
|
81
81
|
- app/assets/stylesheets/payify/application.css
|
82
|
+
- app/controllers/concerns/payify/payments_controller_concern.rb
|
82
83
|
- app/controllers/payify/payments_controller.rb
|
83
84
|
- app/helpers/payify/application_helper.rb
|
84
85
|
- app/jobs/payify/application_job.rb
|