Skip to content

Conversation

mrbrdo
Copy link

@mrbrdo mrbrdo commented Mar 11, 2022

The way the paymentMethodID is passed to the JS is not working due to scripts not being loaded yet.
Fixed this by passing it through a data attribute on the button. I also used Spree.ready instead of $(document).ready.

Also I added a way to track which lib hid the save button, because I based another payment system on this gem and they would then override hiding the button between each other (basically one lib would hide the button but the other one would show it back immediately). Although it's not needed for this gem itself it may be helpful to others in similar situation or if I release the other gem.

By the way really thanks for this gem, I can't believe how amateur and shitty the official spree braintree vzero gem is. Looks like they used it as a play project for their juniors to try Ruby or something. Meanwhile this gem hasn't had an update for 3 years and still works great except for this JS error and the SSL issue, but these are not hard to fix.

mrbrdo added 2 commits March 11, 2022 16:01
…tinue button, allowing other libraries to use the same method of hiding the button.
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.

1 participant