pay 3.0.1 → 3.0.2
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 +4 -4
- data/app/models/pay/charge.rb +25 -1
- data/app/models/pay/subscription.rb +1 -1
- data/app/views/pay/payments/show.html.erb +0 -1
- data/lib/pay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72854ccf4950082b24ff854f6c20b9dfd27ed606af82032ac57edef72c5722a5
|
|
4
|
+
data.tar.gz: dfe726cedf8ac7afd9ff5b4fa87cd96563244f493f1e3f399c749b3492c534d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: acadc8b9c2de89ff113ef75550fb6f82dc79cb3a4bca20834bdfa6ed47e81397405782cef60462248e98a68ab9833ab4bf61429dbd92b0891642e35825b98348
|
|
7
|
+
data.tar.gz: 709dd5387de015deb67eaaf7a770bd6b23ff2b70159c8f22ee5b2063c0bbda4326af67b24effcc19280604dc98373894b42260e728b00ec1b42c480c3bb27a67
|
data/app/models/pay/charge.rb
CHANGED
|
@@ -63,9 +63,33 @@ module Pay
|
|
|
63
63
|
def charged_to
|
|
64
64
|
case payment_method_type
|
|
65
65
|
when "card"
|
|
66
|
-
"#{brand} (**** **** **** #{last4})"
|
|
66
|
+
"#{brand.titleize} (**** **** **** #{last4})"
|
|
67
67
|
when "paypal"
|
|
68
68
|
"#{brand} (#{email})"
|
|
69
|
+
|
|
70
|
+
# Braintree
|
|
71
|
+
when "venmo"
|
|
72
|
+
"#{brand.titleize} #{username}"
|
|
73
|
+
when "us_bank_account"
|
|
74
|
+
"#{bank} #{last4}"
|
|
75
|
+
|
|
76
|
+
# Stripe
|
|
77
|
+
when "acss_debit"
|
|
78
|
+
"#{bank} #{last4}"
|
|
79
|
+
when "eps", "fpx", "ideal", "p24"
|
|
80
|
+
bank
|
|
81
|
+
|
|
82
|
+
when "au_becs_debit"
|
|
83
|
+
"BECS Debit #{last4}"
|
|
84
|
+
|
|
85
|
+
when "bacs_debit"
|
|
86
|
+
"Bacs Debit #{last4}"
|
|
87
|
+
|
|
88
|
+
when "sepa_debit"
|
|
89
|
+
"SEPA Debit #{last4}"
|
|
90
|
+
|
|
91
|
+
else
|
|
92
|
+
payment_method_type&.titleize
|
|
69
93
|
end
|
|
70
94
|
end
|
|
71
95
|
end
|
|
@@ -110,7 +110,7 @@ module Pay
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
def swap(plan)
|
|
113
|
-
raise ArgumentError, "plan must be a string" unless plan.is_a?(String)
|
|
113
|
+
raise ArgumentError, "plan must be a string. Got `#{plan.inspect}` instead." unless plan.is_a?(String)
|
|
114
114
|
payment_processor.swap(plan)
|
|
115
115
|
update(processor_plan: plan, ends_at: nil, status: :active)
|
|
116
116
|
end
|
data/lib/pay/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Charnes
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2021-09-
|
|
12
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|