mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Initialize stripe-cards controller when selecting a payment method
This commit is contained in:
@@ -12,6 +12,14 @@ export default class extends Controller {
|
||||
|
||||
selectPaymentMethod(event) {
|
||||
this.doSelectPaymentMethod(event.target.dataset.paymentmethodId);
|
||||
const stripeCardsController =
|
||||
this.application.getControllerForElementAndIdentifier(
|
||||
document
|
||||
.getElementById(event.target.dataset.paymentmethodId)
|
||||
.querySelector('[data-controller="stripe-cards"]'),
|
||||
"stripe-cards"
|
||||
);
|
||||
stripeCardsController.connect();
|
||||
}
|
||||
|
||||
doSelectPaymentMethod(paymentMethodContainerId) {
|
||||
|
||||
Reference in New Issue
Block a user