pay 7.2.1 → 7.3.0
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/controllers/pay/webhooks/stripe_controller.rb +2 -1
- data/lib/pay/fake_processor/billable.rb +5 -1
- data/lib/pay/stripe/webhooks/checkout_session_completed.rb +1 -1
- data/lib/pay/stripe/webhooks/subscription_trial_will_end.rb +1 -1
- data/lib/pay/stripe.rb +6 -1
- data/lib/pay/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ec013c6c05d0e8027b628258882c9bac3a01f7942e9654cc52582643cf57629
|
4
|
+
data.tar.gz: 75bcbbfcd8b63bb0f73e97b4a4da41335923f5f3af2e8577fc1f2aa94baa8542
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd2822689a009a126f016365182312e4555098ba40b429e16c1dc41b76902a4fd18da06e3465b25cf17e0bf53371adf147bfd3c72e2c9186ce965de304f403e4
|
7
|
+
data.tar.gz: 1ad32b2e21be33e58ffb855dec4275cdff66d036a1728f2573d54d61a2937c6aa6c4602cb59f1dc53bea2edcd4fac46f89efcb91a5ea22443669087569959e5b
|
@@ -79,7 +79,11 @@ module Pay
|
|
79
79
|
}
|
80
80
|
)
|
81
81
|
|
82
|
-
|
82
|
+
if default
|
83
|
+
pay_customer.payment_methods.where.not(id: pay_payment_method.id).update_all(default: false)
|
84
|
+
pay_customer.reload_default_payment_method
|
85
|
+
end
|
86
|
+
|
83
87
|
pay_payment_method
|
84
88
|
end
|
85
89
|
|
@@ -10,7 +10,7 @@ module Pay
|
|
10
10
|
|
11
11
|
if (payment_intent_id = event.data.object.payment_intent)
|
12
12
|
payment_intent = ::Stripe::PaymentIntent.retrieve({id: payment_intent_id}, {stripe_account: event.try(:account)}.compact)
|
13
|
-
Pay::Stripe::Charge.sync(payment_intent.latest_charge, stripe_account: event.try(:account))
|
13
|
+
Pay::Stripe::Charge.sync(payment_intent.latest_charge, stripe_account: event.try(:account)) if payment_intent.latest_charge
|
14
14
|
end
|
15
15
|
|
16
16
|
if (subscription_id = event.data.object.subscription)
|
@@ -8,7 +8,7 @@ module Pay
|
|
8
8
|
pay_subscription = Pay::Subscription.find_by_processor_and_id(:stripe, object.id)
|
9
9
|
return if pay_subscription.nil?
|
10
10
|
|
11
|
-
pay_subscription.sync!
|
11
|
+
pay_subscription.sync!(stripe_account: event.try(:account))
|
12
12
|
|
13
13
|
pay_user_mailer = Pay.mailer.with(pay_customer: pay_subscription.customer, pay_subscription: pay_subscription)
|
14
14
|
|
data/lib/pay/stripe.rb
CHANGED
@@ -30,7 +30,7 @@ module Pay
|
|
30
30
|
|
31
31
|
extend Env
|
32
32
|
|
33
|
-
REQUIRED_VERSION = "~>
|
33
|
+
REQUIRED_VERSION = "~> 12"
|
34
34
|
|
35
35
|
# A list of database model names that include Pay
|
36
36
|
# Used for safely looking up models with client_reference_id
|
@@ -66,6 +66,11 @@ module Pay
|
|
66
66
|
find_value_by_name(:stripe, :signing_secret)
|
67
67
|
end
|
68
68
|
|
69
|
+
def self.webhook_receive_test_events
|
70
|
+
value = find_value_by_name(:stripe, :webhook_receive_test_events)
|
71
|
+
value.blank? ? true : ActiveModel::Type::Boolean.new.cast(value)
|
72
|
+
end
|
73
|
+
|
69
74
|
def self.configure_webhooks
|
70
75
|
Pay::Webhooks.configure do |events|
|
71
76
|
# Listen to the charge event to make sure we get non-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: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Charnes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-07-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
187
|
+
rubygems_version: 3.5.13
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Payments engine for Ruby on Rails
|