Problem/Motivation

When multiple payment options are enabled for braintree (paypal and cc) switching payment methods causes a failure.
In the console this error shows up: Uncaught TypeError: $form.removeOnce is not a function

Steps to reproduce

  • Enable multiple Braintree methods for one payment method
  • Get to checkout
  • Change from paypal to card
  • Fill out shipping info etc
  • Click review
  • Nothing happens

Proposed resolution

Replace removeOnce with once.remove

Remaining tasks

Review

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
#6 commerce_braintree_3390646-6.patch1008 bytesvitaliyb98
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rgpublic created an issue. See original summary.

shiv_yadav made their first commit to this issue’s fork.

Lukas von Blarer made their first commit to this issue’s fork.

luksak’s picture

Status: Active » Needs review

That MR fixes the issue for me.

vitaliyb98’s picture

StatusFileSize
new1008 bytes

jquery.removeOnce should be replaced with once.remove in the commerce_braintree.review.js as well

nicxvan made their first commit to this issue’s fork.

nicxvan’s picture

I've combined the provided patch in the MR and the work from: https://www.drupal.org/project/commerce_braintree/issues/3402816

When applying credit please also credit people from the other issue that contributed.
I've hidden the patch since it's in the MR.

nicxvan’s picture

Issue summary: View changes
tomtech’s picture

Assigned: Unassigned » tomtech
tomtech’s picture

tomtech’s picture

Status: Needs review » Fixed

Merged. Thanks, all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nicxvan’s picture