UNPKG

@malga-checkout/core

Version:
23 lines (19 loc) 484 B
'use strict'; const settings = require('./settings-914617c5.js'); const { state, onChange } = settings.createStore({ selectedPaymentMethod: '', isSelectedSavedCard: false, cvv: '', installments: '', cardId: '', chargeId: '', paymentUrl: '', }); onChange('selectedPaymentMethod', (value) => { state.cvv = ''; state.cardId = ''; state.installments = ''; state.paymentUrl = ''; state.isSelectedSavedCard = value.includes('credit-'); }); exports.state = state;