pay 8.2.2 → 8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fabadba6082c91114d763242a738a19dab355dde46f6079a4ae474b9ba64c538
4
- data.tar.gz: 4348766c53d5630613dacf04a61d1f49714076f91de1e0594625cf088072b61f
3
+ metadata.gz: 8db3bdd142f76a9bd53d2a5e490c8209570c0b56e29a285c7d261bfab89a8fd8
4
+ data.tar.gz: cb518172aa52336942cd612bdf3f4df5a6145109748cfa58b2d07b62361aab83
5
5
  SHA512:
6
- metadata.gz: 8886673e5e4a1ee8d478c9214861e1b8ba2032d3f54b50664ece5cebd7d1545ef8945f167d87455ffaf739a6b758b016d297069889bb7b47efaf47028928e09a
7
- data.tar.gz: b91bd40b0de1d41b191faa0f2fccacb3de48fc2b3fa83698df75897b93de065b11a132d9958e1f31572d2cf4c57e372aa2d7033844226c5f71eeef8dfe49f68e
6
+ metadata.gz: fd1d1207c6babf29d763320cced7aa7d595c49d55125c5655132c021a2c836cae85f1c51909ad3e2141545ec0d44fd9575db14ca3dc78dfb25c2a16fa5446606
7
+ data.tar.gz: b0c7e0b96b6d7734fb967fd93b328e890c1085eb8c2b159b2ea6ccdd4093e073af39c0785fad9c75bcdfe918ee77a8028f4b9a931cdc72b3571f644844dfd449
data/README.md CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  # 💳 Pay - Payments engine for Ruby on Rails
4
4
 
5
- [![Build Status](https://github.com/pay-rails/pay/workflows/Tests/badge.svg)](https://github.com/pay-rails/pay/actions) [![Gem Version](https://badge.fury.io/rb/pay.svg)](https://badge.fury.io/rb/pay)
6
-
7
- <img src="docs/images/stripe_partner_badge.svg" height="26px">
5
+ [![Build Status](https://github.com/pay-rails/pay/workflows/Tests/badge.svg)](https://github.com/pay-rails/pay/actions) [![Gem Version](https://badge.fury.io/rb/pay.svg)](https://badge.fury.io/rb/pay) <img src="docs/images/stripe_partner_badge.svg" height="26px">
8
6
 
9
7
  Pay is a payments engine for Ruby on Rails 6.0 and higher.
10
8
 
11
- ⚠️ **Upgrading?** Check the [UPGRADE](UPGRADE.md) guide for required changes and/or migration when upgrading from a previous version of Pay.
9
+ > [!TIP]
10
+ > Check out [Jumpstart](https://jumpstartrails.com) for Rails Starter Kit with Pay already integrated!
11
+
12
+ **Upgrading?** Check the [UPGRADE](UPGRADE.md) guide for required changes and/or migration when upgrading from a previous version of Pay.
12
13
 
13
14
  ## 🧑‍💻 Tutorial
14
15
 
@@ -1,11 +1,15 @@
1
1
  module Pay
2
2
  module FakeProcessor
3
3
  class Subscription < Pay::Subscription
4
+ def self.sync(processor_id, **options)
5
+ # Bypass sync operation for FakeProcessor
6
+ end
7
+
4
8
  def api_record(**options)
5
9
  self
6
10
  end
7
11
 
8
- # With trial, sets end to trial end (mimicing Stripe)
12
+ # With trial, sets end to trial end (mimicking Stripe)
9
13
  # Without trial, sets can ends_at to end of month
10
14
  def cancel(**options)
11
15
  return if canceled?
@@ -8,8 +8,9 @@ module Pay
8
8
 
9
9
  object = event.data.object
10
10
 
11
+ # Don't send email on incomplete Stripe subscriptions since they're just getting created and the JavaScript will handle SCA
11
12
  pay_subscription = Pay::Subscription.find_by_processor_and_id(:stripe, object.subscription)
12
- return if pay_subscription.nil?
13
+ return if pay_subscription.nil? || pay_subscription.status == "incomplete"
13
14
 
14
15
  if Pay.send_email?(:payment_action_required, pay_subscription)
15
16
  Pay.mailer.with(
@@ -8,8 +8,9 @@ module Pay
8
8
 
9
9
  object = event.data.object
10
10
 
11
+ # Don't send email on incomplete Stripe subscriptions since they're just getting created and the JavaScript will handle SCA
11
12
  pay_subscription = Pay::Subscription.find_by_processor_and_id(:stripe, object.subscription)
12
- return if pay_subscription.nil?
13
+ return if pay_subscription.nil? || pay_subscription.status == "incomplete"
13
14
 
14
15
  if Pay.send_email?(:payment_failed, pay_subscription)
15
16
  Pay.mailer.with(
data/lib/pay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pay
2
- VERSION = "8.2.2"
2
+ VERSION = "8.3.0"
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.2
4
+ version: 8.3.0
5
5
  platform: ruby
6
- original_platform: ''
7
6
  authors:
8
7
  - Jason Charnes
9
8
  - Chris Oliver
10
9
  - Collin Jilbert
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-12-13 00:00:00.000000000 Z
13
+ date: 2024-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -165,6 +165,7 @@ homepage: https://github.com/pay-rails/pay
165
165
  licenses:
166
166
  - MIT
167
167
  metadata: {}
168
+ post_install_message:
168
169
  rdoc_options: []
169
170
  require_paths:
170
171
  - lib
@@ -179,7 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  - !ruby/object:Gem::Version
180
181
  version: '0'
181
182
  requirements: []
182
- rubygems_version: 3.6.0.dev
183
+ rubygems_version: 3.5.23
184
+ signing_key:
183
185
  specification_version: 4
184
186
  summary: Payments engine for Ruby on Rails
185
187
  test_files: []