mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-11 11:23: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
12 lines
257 B
TypeScript
12 lines
257 B
TypeScript
export const createSingleton = <T>(s?: symbol | string) => {
|
|
const symbol = !s ? Symbol() : s
|
|
return {
|
|
get(container: any) {
|
|
return container[symbol] as T
|
|
},
|
|
set(container: any, value: T) {
|
|
container[symbol] = value
|
|
},
|
|
}
|
|
}
|