Errors encountered when anonymous users switch payment processors
- Install Stripe 6.4.1 and MJWShared 0.8 on CiviCRM 5.26.2 (on WordPress; I haven't tried other environments yet).
- Create a contribution page using Stripe and PayPal Website Payments Standard (builtin to CiviCRM core) as the payment processors.
- Visit the contribution page with an anonymous session,
- Switch between the payment processors and try to complete the payment.
When switching to Stripe, a JS alert is displayed: "You do not have permission to access this page" (this appears to be due to an ajax call returning this error message).
When switching to PayPal, the following JS error is logged in the console and the "Review your contribution" button doesn't work:
Uncaught (in promise) IntegrationError: We could not retrieve data from the specified Element. Please make sure the Element you are attempting to use is still mounted. at new t (https://js.stripe.com/v3:1:10981) at ho (https://js.stripe.com/v3:1:53641) at e._handleMessage (https://js.stripe.com/v3:1:60058) at e._handleMessage (https://js.stripe.com/v3:1:27393) at https://js.stripe.com/v3:1:58660