UNPKG

@malga-checkout/core

Version:
18 lines (17 loc) 527 B
import { CustomerCards } from '../../../../services/customer-cards'; import savedCards from '../../../../stores/saved-cards'; import settings from '../../../../stores/settings'; export class MalgaPaymentsCreditSavedCardsService { constructor() { this.customerCards = new CustomerCards(); } async listSavedCards() { try { const cards = await this.customerCards.list(settings.transactionConfig.customerId); savedCards.cards = cards.data; } catch (err) { savedCards.cards = []; } } }