@malga-checkout/core
Version:
Core components for Malga Checkout
17 lines (16 loc) • 509 B
JavaScript
import { BaseProvider } from '../base-provider';
import settings from '../../stores/settings';
import { getItems } from './pix.utils';
export class Pix extends BaseProvider {
constructor({ pix }) {
super({
customerId: settings.transactionConfig.customerId,
customer: settings.transactionConfig.customer,
});
this.pix = pix;
}
getPaymentMethod() {
const items = getItems(this.pix);
return Object.assign({ paymentType: 'pix', expiresIn: this.pix.expiresIn }, items);
}
}