@unchainedshop/plugins
Version:
Because of a Typescript issue with upstream "postfinancecheckout", the Postfinance plugin has been disabled from transpilation, import the source ts files from src and enable node_module tsc or copy over the src/payment/postfinance-checkout to your projec
41 lines (30 loc) • 831 B
text/typescript
import { IPaymentAdapter, PaymentAdapter, PaymentDirector } from '@unchainedshop/core';
import { PaymentProviderType } from '@unchainedshop/core-payment';
const InvoicePrepaid: IPaymentAdapter = {
...PaymentAdapter,
key: 'shop.unchained.invoice-prepaid',
label: 'Invoice pre-paid',
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 false;
},
charge: async () => {
return false;
},
};
},
};
PaymentDirector.registerAdapter(InvoicePrepaid);