Skip to content

Conversation

@Eeshu-Yadav
Copy link
Contributor

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

When both payment_requires_internet and captive_portal_sync_auth are enabled, the payment flow was not working properly. Users were redirected to /payment/draft instead of /payment/process after captive portal login.

The issue was that proceedToPayment flag was lost during page reload caused by synchronous captive portal form submission. The fix persists proceedToPayment in cookies/localStorage (similar to mustLogin) so it survives the page reload.

Changes:

  • Added captivePortalSyncAuth to payment-status component props
  • Store proceedToPayment in cookie/localStorage when captivePortalSyncAuth is enabled
  • Resolve proceedToPayment from cookie/localStorage in status component finalOperations
  • Added comprehensive test coverage for the fix

Fixes #950

When both payment_requires_internet and captive_portal_sync_auth are enabled,
the payment flow was not working properly. Users were redirected to /payment/draft
instead of /payment/process after captive portal login.

The issue was that proceedToPayment flag was lost during page reload caused by
synchronous captive portal form submission. The fix persists proceedToPayment
in cookies/localStorage (similar to mustLogin) so it survives the page reload.

Changes:
- Added captivePortalSyncAuth to payment-status component props
- Store proceedToPayment in cookie/localStorage when captivePortalSyncAuth is enabled
- Resolve proceedToPayment from cookie/localStorage in status component finalOperations
- Added comprehensive test coverage for the fix

Fixes openwisp#950
@Eeshu-Yadav Eeshu-Yadav force-pushed the issues/950-captive-portal-payment-auth-conflict branch from a4d90a4 to 34ab3d4 Compare December 26, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Issues when both payment_requires_internet & captive_portal_sync_auth set to true

1 participant