@unchainedshop/plugins
Version:
Official plugin collection for the Unchained Engine with payment, delivery, and pricing adapters
28 lines (27 loc) • 792 B
JavaScript
import { PaymentAdapter, PaymentDirector } from '@unchainedshop/core';
import { PaymentProviderType } from '@unchainedshop/core-payment';
const Invoice = {
...PaymentAdapter,
key: 'shop.unchained.invoice',
label: 'Invoice',
version: '1.0.0',
initialConfiguration: [],
typeSupported: (type) => {
return type === PaymentProviderType.INVOICE;
},
actions: (config, context) => {
return {
...PaymentAdapter.actions(config, context),
configurationError: () => {
return null;
},
isActive: () => {
return true;
},
isPayLaterAllowed: () => {
return true;
},
};
},
};
PaymentDirector.registerAdapter(Invoice);