@malga-checkout/core
Version:
Core components for Malga Checkout
17 lines (16 loc) • 596 B
JavaScript
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);
}
}