Documents the 16.7x test speedup achieved through pytest-xdist:
- Explains per-worker database isolation strategy
- Details SQLite WAL mode configuration for concurrency
- Describes automatic worker distribution and load balancing
- Covers implementation challenges and solutions
- Provides performance metrics and hardware requirements
- Includes best practices for parallel-safe tests
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PayPal:
- Document invasive KYC requirements (face scanning, government ID)
- Note that crypto is the privacy-preserving alternative
Adyen:
- Document integration approach (similar to Stripe)
- Include Python library usage, webhooks, credentials needed
- Status: not yet implemented
- Add stripe_payment_intent_id and stripe_charge_id columns to Invoice
- Store payment references during checkout for traceability
- Use idempotency key to prevent duplicate charges on retry
- Add Stripe webhook handler for payment_intent.succeeded, payment_failed,
charge.refunded, and charge.dispute.created events
- Consolidate PayPal webhooks into webhooks.py
- Add stripe.webhook_secret configuration for signature verification
Tests: 8 unit, 5 integration, 7 functional tests for Stripe functionality
- Add paypal_order_id and paypal_capture_id columns to Invoice model
- Update migration to add columns to mps_invoice instead of creating separate table
- Remove PayPalPayment model (simpler architecture matching Stripe)
- Update paypal.py to store PayPal info directly on Invoice
- Update paypal_webhooks.py to query Invoice by paypal_order_id
- Update Invoice.payment_method property to detect PayPal payments
- Create docs/ directory and move CHANGES_PAYPAL.md into it
- Add CHANGELOG.rst with unreleased section for PayPal integration
- Update README.rst to mention PayPal alongside other payment methods
- Fix negative DOGE processing fees from estimatesmartfee RPC issues
- Add abs() protection for both DOGE and Monero fee calculations
- Reduce transaction size estimate from 0.25KB to 0.15KB (more realistic)
- Change fee multiplier from 2x to 1.5x (less excessive)
- Set reasonable fallback fee of 0.5 DOGE when RPC fails
- Add negative feerate detection with proper error handling
- Fix crypto payment status color mapping (case insensitive lookup)
- Add missing status mappings for confirmed-overpay-complete and doublepay-refund-complete
- Improve comment system UI with dark mode styling and better layout
- Add CSS preloader to prevent trans-background image flashing
- Enhance user settings page with better button organization
- Remove "View Quote" button for cancelled crypto quotes
- Fix comment form styling and authentication flow
- Convert all state names from underscore to dash format in markdown documentation
- Ensures consistency across all documentation formats (dot, svg, markdown)
- All payment states now use dashes: confirmed-complete, underpaid-refunded, etc.
- Maintains consistency with the source dot file which is the canonical reference
This completes the documentation naming convention standardization.
- Add section explaining real-time status updates on quote page
- Document automatic redirects to invoice/download upon confirmation
- Clarify that payment buttons are disabled once payment received
- Note that confirmations can be as fast as 2 for digital goods
- Remove duplicate dogecoin.conf examples from Advanced Configuration
- Simplify to reference make dogecoin-config command
- Keep only essential full node vs pruned mode trade-offs
- Remove incorrect SQL index examples from DOGECOIN.md and MONERO.rst
- Simplify Dogecoin node security section to reference make command
- Stop leaking database schema details in user-facing documentation
- Change from 50GB to 200GB+ for full blockchain size
- Update space savings calculation from 96% to 99%
- Based on growth from 110GB in early 2024 to likely 200GB+ in 2025
- Update prune size from 2GB to 2.2GB throughout docs
- Change prune=2000 to prune=2200 to match make dogecoin-config
- Update wallet name to mps_wallet to match actual configuration
- Remove 'Automated Health Checks' section - redundant with make commands
- Simplify recovery procedures to match Dogecoin documentation style
- Remove bash script examples and implementation details
- Keep focus on essential backup/recovery information
- Replace Python validation functions with simple descriptions
- Keep validation rules (D prefix, 34 chars for DOGE; 4 prefix, 95/106 chars for XMR)
- Documentation should describe what, not show implementation how
- Replace manual installation steps with make install-dogecoin
- Replace manual configuration with make dogecoin-config
- Remove raw dogecoin-cli commands in favor of make targets
- Keep documentation focused on what users need to do, not implementation details
- Multi-node setups would cause account index mismatches
- Monero wallets can't be sharded or load balanced
- Replace with honest scaling limitations and realistic options
- Single wallet file is a fundamental architectural constraint
- Document actual resource requirements from production systems
- Fix fee documentation: fee buffers are for quotes, not wallet reserves
- Clarify perfect accounting to quote amounts in atomic units
- Remove generic curl/API tutorials, keep Make commands
- Add dust prevention benefit of exact amount sweeping
- Update Makefile targets to match what actually exists
- Remove error messages from sweep/sweep-check Makefile targets
- Keep commands functional for developers/admins in local environments
- Simplify documentation to focus on automatic sweeping behavior
- Maintain separation between end-user docs and dev tools
Major fixes:
1. Remove invalid received→expired transition
- Payments that reach 'received' state cannot expire
- Only pending payments can expire
- Updated VALID_TRANSITIONS and tests accordingly
2. Rename STATUS_DOUBLEPAY_REFUND to STATUS_DOUBLEPAY_REFUNDED
- Maintains consistency with all other past-tense status names
- Updated all references across codebase and tests
3. Add INITIAL_WAITING_STATUSES semantic group
- Groups states that are entry points: pending, latepay_refunded, doublepay_refunded
- These states don't transition from 'received' - they represent initial states
- Added is_initial_waiting_state() helper method
4. Update semantic groups
- Removed latepay_refunded and doublepay_refunded from FAILED_PAYMENT_STATUSES
- These are now in INITIAL_WAITING_STATUSES as they represent entry points
5. Fix mermaid diagram label
- confirmed_overpay_not_refunded now correctly labeled as "Terminal Success (Not Refunded)"
- Remove invalid received→expired transition from documentation
This improves the logical consistency of the state machine and aligns
the naming conventions across all status constants.
- Fix duplicate detection logic to prevent amount accumulation when new transactions arrive to already-processed payments
- Fix status constant naming errors: STATUS_CONFIRMED_OVERPAID → STATUS_CONFIRMED_OVERPAY, STATUS_EXPIRED_REFUNDED → STATUS_LATEPAY_REFUNDED
- Fix SweepRestockingFeeTests mock setup: add missing refund_confirmations, get_coin_config patches, and proper XMR client mocks
- Correct overpayment test expectations: restocking fee sweep happens later after refund confirmation, not immediately
- Update test assertions to match actual implementation behavior (transfer vs sweep_all for XMR)
- Add comprehensive mock configurations for DOGE/XMR atomic units and balance methods
All 108 crypto payment tests now pass. Fixes critical duplicate payment processing bug and aligns test expectations with production behavior.
* Implement complete state machine with 17 test scenarios
* Add priority-based processing order validation
* Include property-based testing for state transitions
* Add graph analysis for state machine integrity
* Validate all payment lifecycle paths
* Ensure robust error handling and logging
* Remove temporary debug files and consolidate test structure
- Remove pooled_sweep logic from both Monero and Dogecoin sweep functions
- Each payment now swept individually for better accounting and audit trail
- Insufficient balance now returns False to retry later instead of fake pooled_sweep
- Update all tests to expect new behavior (False for insufficient balance)
- Update documentation to reflect 1:1 payment-to-sweep mapping
- Add link to refund address configuration in crypto checkout template
- All crypto watcher tests now passing with new individual sweep logic
- Add proper inventory checking before crypto payment completion
- Implement sequential (FIFO) crypto payment processing to prevent race conditions
- Add comprehensive out-of-stock refund handling with two statuses:
- STATUS_OUT_OF_STOCK_REFUNDED: Full refund to customer (no restocking fee)
- STATUS_OUT_OF_STOCK_NO_REFUND: Sweep to shop when no refund address
- Use sweep_all with subaddr_indices for Monero to ensure complete fund recovery
- Use sendtoaddress with subtractfeefromamount for Dogecoin fee handling
- Add refund tracking fields (refund_reason, refund_tx_hash, refund_amount)
- Update MONERO.rst with subaddress isolation and refund processing documentation
- Ensure action buttons are removed for non-pending crypto quotes to prevent double payments
- Move CRYPTO.rst to docs/CRYPTO.rst
- Move CRYPTO_PROBLEMS.rst to docs/CRYPTO_PROBLEMS.rst
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>