Commit Graph

8 Commits

Author SHA1 Message Date
Jean-Baptiste Bellet
3247c32191 Be consistant and use data-paymentmethod-id attribute
as already used on other element
2023-01-23 17:48:54 +01:00
Jean-Baptiste Bellet
251ab2ac9a Payment method id attribute don't need to start with paymentmethod 2023-01-23 17:46:26 +01:00
Jean-Baptiste Bellet
7320a1714c Instead of selecting the controller, send an event handled by stripe-cards
Using a query selector to find controller in order to call method could be dangerous as the DOM can change. Using an event should be more robust.
2023-01-18 17:40:17 +01:00
Jean-Baptiste Bellet
61928cbc05 Run prettier formatter 2022-08-08 14:40:58 +10:00
Matt-Yorkley
723d6489cd Extract initSelectedCard() 2021-12-20 18:36:26 +00:00
Matt-Yorkley
a64f654697 Don't try to select a card if there is no selectTarget
This error was being thrown when the user had no cards saved:
```
Error: Missing target element "stripe-cards.select"
```
2021-12-20 15:41:22 +00:00
Jean-Baptiste Bellet
d4ec075dfc Disabled stripe-cards input if a already registred card is select
And then re-enabled it, if use decide to register a new card
2021-12-20 15:34:58 +01:00
Matt-Yorkley
d85597fe4c Rename stripe cards controller 2021-12-07 16:29:25 +00:00