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

24 lines 904 B
import { SaferpayTransactionsCollection } from '../db/SaferpayTransactionsCollection.js'; export const configureSaferpayTransactionsModule = async ({ db }) => { const SaferpayTransactions = await SaferpayTransactionsCollection(db); return { findTransactionById: async (_id) => { return SaferpayTransactions.findOne({ _id, }); }, createTransaction: async (orderPaymentId) => { const result = await SaferpayTransactions.insertOne({ created: new Date(), orderPaymentId, }); return result.insertedId; }, setToken: async (_id, token) => { await SaferpayTransactions.updateOne({ _id }, { $set: { token, updated: new Date() }, }); }, }; }; //# sourceMappingURL=configureSaferpayTransactionsModule.js.map