PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Modules/PaymentMethods/StripeGateway/SubscriptionsManager.php +4 -4 1.6.0 → 1.6.5 View file →
@@ -77,20 +77,20 @@
77 77
78 78 /**
79 79 * Check rate limit for SetupIntent creation to prevent card testing fraud.
80 80 *
81 - * Rate limit: 7 attempts per day per customer by default (for subscription
81 + * Rate limit: 5 attempts per day per customer by default (for subscription
82 82 * card updates), overridable via the
83 83 * fluent_cart/stripe/setup_intent_rate_limit_customer_daily filter. The SAME
84 84 * filter default feeds getRemainingRateLimit(), so enforcement and the
85 85 * displayed remaining count share one contract.
86 - *
86 + *
87 87 * @param string $customerId Stripe customer ID
88 88 * @return bool|\WP_Error Returns true if allowed, WP_Error if rate limited
89 89 */
90 90 protected static function checkRateLimit($customerId)
91 91 {
92 - $customerDailyLimit = apply_filters('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', 7, $customerId);
92 + $customerDailyLimit = apply_filters('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', 5, $customerId);
93 93
94 94 $customerDailyKey = 'fct_stripe_setup_intent_rate_daily_' . md5($customerId);
95 95 $customerDailyAttempts = get_transient($customerDailyKey) ?: 0;
96 96
@@ -104,9 +104,9 @@
104 104 }
105 105
106 106 public function getRemainingRateLimit($customerId)
107 107 {
108 - $customerDailyLimit = apply_filters('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', 7, $customerId);
108 + $customerDailyLimit = apply_filters('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', 5, $customerId);
109 109 $customerDailyKey = 'fct_stripe_setup_intent_rate_daily_' . md5($customerId);
110 110 $customerDailyAttempts = get_transient($customerDailyKey) ?: 0;
111 111 return $customerDailyLimit - $customerDailyAttempts;
112 112 }