pay 4.0.2 → 4.0.4
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/lib/pay/receipts.rb +2 -1
- data/lib/pay/stripe/billable.rb +1 -1
- data/lib/pay/stripe/subscription.rb +2 -2
- 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: 6659a95f47cd229375f090cb734b440ca8484cd9672b88bd482dede070fa6819
|
4
|
+
data.tar.gz: 408ef1cbfd3364d30d7e7bbfd78c58b585034c54e65346db92f1e9a7cf3ab279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ffbc4d1d685f994a1dc3e45d8b7f20a4a4d4f8852cd3ca7d349d2af5cc22445c2c526eef8906305aa80b8d37ae82c6f0101b271a121b66d4bc4624f82446480
|
7
|
+
data.tar.gz: 12332883526b3e321e70e8b30445b40dfa85715f3a7a7bfece32940fb857f8f747b586d48245f760b9e3866a54d2532d9ca9dce8b0da55441f3b619cec14072f
|
data/lib/pay/receipts.rb
CHANGED
@@ -60,7 +60,8 @@ module Pay
|
|
60
60
|
|
61
61
|
# Tax rates
|
62
62
|
Array.wrap(total_tax_amounts).each do |tax_amount|
|
63
|
-
|
63
|
+
next if tax_amount["amount"].zero?
|
64
|
+
items << [nil, nil, tax_description(tax_amount), Pay::Currency.format(tax_amount["amount"], currency: currency)]
|
64
65
|
end
|
65
66
|
|
66
67
|
items << [nil, nil, I18n.t("pay.line_items.total"), Pay::Currency.format(amount, currency: currency)]
|
data/lib/pay/stripe/billable.rb
CHANGED
@@ -104,7 +104,7 @@ module Pay
|
|
104
104
|
def subscribe(name: Pay.default_product_name, plan: Pay.default_plan_name, **options)
|
105
105
|
quantity = options.delete(:quantity)
|
106
106
|
opts = {
|
107
|
-
expand: ["pending_setup_intent", "latest_invoice.payment_intent", "latest_invoice.charge
|
107
|
+
expand: ["pending_setup_intent", "latest_invoice.payment_intent", "latest_invoice.charge"],
|
108
108
|
items: [plan: plan, quantity: quantity],
|
109
109
|
off_session: true
|
110
110
|
}.merge(options)
|
@@ -84,7 +84,7 @@ module Pay
|
|
84
84
|
|
85
85
|
# Sync the latest charge if we already have it loaded (like during subscrbe), otherwise, let webhooks take care of creating it
|
86
86
|
if (charge = object.try(:latest_invoice).try(:charge)) && charge.try(:status) == "succeeded"
|
87
|
-
Pay::Stripe::Charge.sync(charge.id,
|
87
|
+
Pay::Stripe::Charge.sync(charge.id, stripe_account: pay_subscription.stripe_account)
|
88
88
|
end
|
89
89
|
|
90
90
|
pay_subscription
|
@@ -100,7 +100,7 @@ module Pay
|
|
100
100
|
|
101
101
|
# Common expand options for all requests that create, retrieve, or update a Stripe Subscription
|
102
102
|
def self.expand_options
|
103
|
-
{expand: ["pending_setup_intent", "latest_invoice.payment_intent", "latest_invoice.charge
|
103
|
+
{expand: ["pending_setup_intent", "latest_invoice.payment_intent", "latest_invoice.charge"]}
|
104
104
|
end
|
105
105
|
|
106
106
|
def initialize(pay_subscription)
|
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: 4.0.
|
4
|
+
version: 4.0.4
|
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: 2022-07-
|
12
|
+
date: 2022-07-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|