Skip to content
Snippets Groups Projects

Fix switching between payment processors for anonymous sessions

Merged mattwire requested to merge fixmultipleprocessors into 6.4

This fixes the following issues:

  1. Switching payment processors in anonymous sessions (user does not have permission for api3 call).
  2. Switching payment processors on drupal webform (when there are multiple Stripe processors).
  3. Switching payment processors on backend forms (when there are multiple Stripe processors).
  • We now specify the API version when configuring Stripe on the client-side.
  • We now set the language for Stripe at the Stripe.js level instead of the card element level.

Original issue !100 (closed) found by @capo

Edited by mattwire

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mattwire changed milestone to %6.4

    changed milestone to %6.4

  • mattwire added bug label

    added bug label

  • mattwire changed the description

    changed the description

  • Author Maintainer

    @capo Please can you test and review this?

  • mattwire mentioned in merge request !100 (closed)

    mentioned in merge request !100 (closed)

  • mattwire added 1 commit

    added 1 commit

    • ec8d845d - Add a minimum API version so we don't have problems every time Stripe release a new API version

    Compare with previous version

  • Contributor

    @mattwire Works fine to me in the same scenario where I was using the other fix.

  • mattwire added 1 commit

    added 1 commit

    • 11645789 - Use new compatAddVars function to add Stripe vars to billing-block so multiple...

    Compare with previous version

  • mattwire added 3 commits

    added 3 commits

    • 119973e8 - 1 commit from branch 6.4
    • 41d6170c - Fix switching between payment processors for anonymous sessions
    • aac38eb0 - Use new compatAddVars function to add Stripe vars to billing-block so multiple...

    Compare with previous version

  • merged

  • mattwire mentioned in issue #172 (closed)

    mentioned in issue #172 (closed)

  • Was this MR actually merged & released? It looks like maybe not?

  • Author Maintainer

    @mfb Yes this went into 6.4

  • Hmm I don't see this code in the 6.4 tag (looking at civicrm_stripe.js)?

  • Author Maintainer

    I can't see it either right now - we fixed it but then did a lot more refactoring so it may no longer be visible? Are you having problems with something @mfb?

  • I'm still seeing bugginess with unauthenticated users switching payment methods between PayPal and Stripe.

  • Author Maintainer

    @mfb What issues are you seeing? There are lot's of other reasons things could happen - also have you tried 6.4.1 branch + mjwshared 0.8 as we fixed another load of stuff on the javascript side.

  • I'm on 6.4.1-beta3 and 0.8-beta2

    Still seeing a "You do not have permission to access this page" alert when switching to Stripe.

    And the "review your contribution" button doesn't work when switching to PayPal due to javascript error:

    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
    Edited by mfb
  • Author Maintainer

    @mfb which version of paypal are you using? Also please test again with 6.4.1-beta4 (I fixed some issues with form submission).

  • I'm using Stripe 6.4.1-beta4 and PayPal Website Payments Standard.

    Looks like the alert when switching back to Stripe has been fixed now.

    When checking out via PayPal, I'm still getting

    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 _o (https://js.stripe.com/v3:1:53784)
        at e._handleMessage (https://js.stripe.com/v3:1:60201)
        at e._handleMessage (https://js.stripe.com/v3:1:27512)
        at https://js.stripe.com/v3:1:58803

    and the "Review your contribution" button no longer works.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading