UNPKG

@malga-checkout/core

Version:
17 lines (16 loc) 596 B
import { BaseProvider } from '../base-provider'; import settings from '../../stores/settings'; import { normalizeTaxValue } from './nupay.utils'; export class NuPay extends BaseProvider { constructor({ nupay }) { super({ customerId: settings.transactionConfig.customerId, customer: settings.transactionConfig.customer, }); this.nupay = nupay; } getPaymentMethod() { const taxValue = normalizeTaxValue(this.nupay); return Object.assign({ paymentType: 'nupay', delayToAutoCancel: this.nupay.delayToAutoCancel, orderUrl: this.nupay.orderUrl }, taxValue); } }