fix: Only increment payment attempts when user actually attempts payment
- Remove payment attempt increment from checkout page load - Add new increment_payment_attempt action triggered only on pay button click - Update checkout JavaScript to make AJAX call before Stripe redirect - Add proper error handling and button state management - Prevent inflated payment attempt counts from page refreshes This ensures payment attempts accurately reflect actual payment tries rather than page visits. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ Rails.application.routes.draw do
|
||||
member do
|
||||
get :checkout
|
||||
post :retry_payment
|
||||
post :increment_payment_attempt
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user