summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions
diff options
context:
space:
mode:
authorNicolò€ Rebughini <nicolo.rebughini@gmail.com>2020-11-17 13:27:25 +0100
committerNicolò€ Rebughini <nicolo.rebughini@gmail.com>2020-11-17 16:06:56 +0100
commitdc925e3717b7a117b067554cafa464627ad78e15 (patch)
treeba804d1af86235097fe12934d21ee4b3f2edaa36 /lib/solidus_subscriptions
parentb3dc679b7056931397820ad333686ef151656ba4 (diff)
Move reprocessing to time based criteria
This changes the logic used to determine whether a subscription should be canceled after consecutive payment failures. Previously it was based on a maximum number of attempts per installment, however it makes sense to have it based on the time passed since the last succesful installment. This makes it also play nice with the new configuration [1] to clear past failed installments, which could render the maximum attempts useless, since there could have been situations where the maximum attempts number would never be reached. Switching to time based criteria makes this simpler and more predictable. [1] https://github.com/solidusio-contrib/solidus_subscriptions/commit/b3dc679b7056931397820ad333686ef151656ba4
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r--lib/solidus_subscriptions/configuration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/solidus_subscriptions/configuration.rb b/lib/solidus_subscriptions/configuration.rb
index 13254be..f09740b 100644
--- a/lib/solidus_subscriptions/configuration.rb
+++ b/lib/solidus_subscriptions/configuration.rb
@@ -3,7 +3,7 @@
module SolidusSubscriptions
class Configuration
attr_accessor(
- :maximum_total_skips, :maximum_reprocessing_attempts, :churn_buster_account_id,
+ :maximum_total_skips, :maximum_reprocessing_time, :churn_buster_account_id,
:churn_buster_api_key, :clear_past_installments,
)