UNPKG

@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

28 lines 932 B
import { PaymentPricingAdapter, PaymentPricingDirector, } from '@unchainedshop/core'; export const PaymentFreePrice = { ...PaymentPricingAdapter, key: 'shop.unchained.pricing.payment-free', label: 'Free Payment', version: '1.0.0', orderIndex: 0, isActivatedFor: () => { return true; }, actions: (params) => { const pricingAdapter = PaymentPricingAdapter.actions(params); return { ...pricingAdapter, calculate: async () => { pricingAdapter.resultSheet().addFee({ amount: 0, isNetPrice: false, isTaxable: false, meta: { adapter: PaymentFreePrice.key }, }); return pricingAdapter.calculate(); }, }; }, }; PaymentPricingDirector.registerAdapter(PaymentFreePrice); //# sourceMappingURL=free-payment.js.map