mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 19:03:23 +00:00
- Introduce `mollieProvider` for handling Mollie payments - Add configurable payment hooks for initialization and processing - Implement `initPayment` logic to create Mollie payments and update metadata - Include types for Mollie integration in payments and refunds - Update `package.json` to include `@mollie/api-client` dependency - Refactor existing payment-related types into modular files for better maintainability
30 lines
629 B
TypeScript
30 lines
629 B
TypeScript
import type { Payload } from 'payload'
|
|
|
|
import { devUser } from './helpers/credentials'
|
|
|
|
export const seed = async (payload: Payload) => {
|
|
// Seed default user first
|
|
const { totalDocs } = await payload.count({
|
|
collection: 'users',
|
|
where: {
|
|
email: {
|
|
equals: devUser.email,
|
|
},
|
|
},
|
|
})
|
|
|
|
if (!totalDocs) {
|
|
await payload.create({
|
|
collection: 'users',
|
|
data: devUser,
|
|
})
|
|
}
|
|
|
|
// Seed billing sample data
|
|
// await seedBillingData(payload)
|
|
}
|
|
|
|
// async function seedBillingData(payload: Payload): Promise<void> {
|
|
// payload.logger.info('Seeding billing sample data...')
|
|
// }
|