pay 3.0.13 → 3.0.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pay might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/models/pay/charge.rb +2 -2
- data/lib/pay/currency.rb +1 -1
- data/lib/pay/payment.rb +5 -1
- data/lib/pay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 775a299c417f1325003083f1a919358c46169daa859454e987adbb7eeab1393e
|
4
|
+
data.tar.gz: 7315d0e4ea8905ceb3f90b4edc3882f122934423f1a3d591e930a0c3f7c68195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 336cba7171af162ec7f7bc3251bda72f94c4ae36bd5795cb7b0f0930da13de06a0d8f1cf0746d22199de513cbc59d753f70b704748dc2d531e581b5f5b697f00
|
7
|
+
data.tar.gz: 5e21ad2c19091786ec6d8fb35a261b644dc6142d3452fdec2681543824e3f81fbe45c37f7f15463565036801a3f3253c4ce2e589920d11df05b596f32b12ad8e
|
data/app/models/pay/charge.rb
CHANGED
@@ -72,11 +72,11 @@ module Pay
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def amount_with_currency
|
75
|
-
Pay::Currency.format(amount
|
75
|
+
Pay::Currency.format(amount, currency: currency)
|
76
76
|
end
|
77
77
|
|
78
78
|
def amount_refunded_with_currency
|
79
|
-
Pay::Currency.format(amount_refunded
|
79
|
+
Pay::Currency.format(amount_refunded, currency: currency)
|
80
80
|
end
|
81
81
|
|
82
82
|
def charged_to
|
data/lib/pay/currency.rb
CHANGED
data/lib/pay/payment.rb
CHANGED
@@ -2,7 +2,7 @@ module Pay
|
|
2
2
|
class Payment
|
3
3
|
attr_reader :intent
|
4
4
|
|
5
|
-
delegate :id, :amount, :client_secret, :customer, :status, :confirm, to: :intent
|
5
|
+
delegate :id, :amount, :client_secret, :currency, :customer, :status, :confirm, to: :intent
|
6
6
|
|
7
7
|
def self.from_id(id)
|
8
8
|
intent = id.start_with?("seti_") ? ::Stripe::SetupIntent.retrieve(id) : ::Stripe::PaymentIntent.retrieve(id)
|
@@ -41,6 +41,10 @@ module Pay
|
|
41
41
|
intent.is_a?(::Stripe::SetupIntent)
|
42
42
|
end
|
43
43
|
|
44
|
+
def amount_with_currency
|
45
|
+
Pay::Currency.format(amount, currency: currency)
|
46
|
+
end
|
47
|
+
|
44
48
|
def validate
|
45
49
|
if requires_payment_method?
|
46
50
|
raise Pay::InvalidPaymentMethod.new(self)
|
data/lib/pay/version.rb
CHANGED