20 Commits

Author SHA1 Message Date
Bas
7b8c89a0a2 Merge pull request #19 from xtr-dev/dev
chore: remove deprecated Claude workflows
2025-09-19 09:56:15 +02:00
d651e8199c chore: remove all Claude configuration and documentation files
- Delete `.github/claude-config.json` and `.github/CLAUDE_PR_ASSISTANT.md`
- Clean up repository by removing unused Claude-related files
- Bump package version to `0.1.7` for metadata update
2025-09-19 09:50:46 +02:00
f77719716f chore: remove deprecated Claude workflows
- Delete `claude-implement-issue.yml` and `claude-pr-assistant.yml` workflows
- Streamline repository automation by removing redundant workflows
- Prepare for future updates with simplified automation setup
2025-09-19 09:28:04 +02:00
Bas
c6e51892e6 Merge pull request #18 from xtr-dev/claude/issue-17-20250918-1938
docs: update README to reflect current codebase features
2025-09-18 21:53:10 +02:00
claude[bot]
38c8c3677d fix: remove non-existent defaultCustomerInfoExtractor from README
Replace defaultCustomerInfoExtractor import and usage with a proper
working example that shows how to define a CustomerInfoExtractor function.

Co-authored-by: Bas <bvdaakster@users.noreply.github.com>
2025-09-18 19:51:01 +00:00
claude[bot]
e74a2410e6 docs: update README to reflect current codebase features
- Update version info from v0.0.x to v0.1.x
- Add comprehensive customer management documentation
- Include customer info extractor examples and configuration
- Document flexible customer data handling modes
- Add missing TypeScript exports to imports section
- Update features list with callback-based syncing and embedded customer info

Co-authored-by: Bas <bvdaakster@users.noreply.github.com>
2025-09-18 19:40:12 +00:00
Bas
27b86132e9 Merge pull request #16 from xtr-dev/dev
Dev
2025-09-18 21:36:05 +02:00
ec635fb707 fix: simplify Claude workflows with clean username checks
- Simplify all permission checks to single username validation
- Remove complex permission logic for cleaner workflows
- Streamline issue implementation workflow
- Streamline PR assistant workflow
- Keep only essential functionality
- Fix YAML syntax issues
- Validate all workflows successfully

Changes:
- Single username check: context.actor !== 'bvdaakster'
- Simplified error messages
- Clean YAML structure
- Reduced complexity while maintaining functionality

All workflows now use simple, reliable permission checks.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:32:12 +02:00
cabe6eda96 feat: add Claude PR Assistant workflow for direct PR improvements
- Create new workflow for PR comment-based Claude assistance
- Support multiple commands: implement, fix, improve, update, refactor, help
- Work directly on PR branches without creating new PRs
- Include comprehensive permission checks (bvdaakster only)
- Add detailed documentation and usage examples
- Support quality checks: build, typecheck, lint, test
- Include smart context awareness of PR changes

Features:
- Direct PR branch modification
- Multiple trigger commands for different types of assistance
- Comprehensive error handling and user feedback
- Quality assurance with automated checks
- Detailed commit messages with attribution

Commands:
- @claude implement - Add new functionality
- @claude fix - Fix bugs or errors
- @claude improve - Enhance existing code
- @claude update - Update to requirements
- @claude refactor - Restructure code
- @claude help - General assistance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:28:54 +02:00
a3108a0f49 Bump package version to 0.1.6 2025-09-18 21:28:03 +02:00
Bas
113a0d36c0 Merge pull request #15 from xtr-dev/claude/issue-14-20250918-1914
fix: export mollieProvider and stripeProvider from main package
2025-09-18 21:27:27 +02:00
8ac328e14f feat: enhance Claude issue workflow with robust PR creation
- Improve change detection to check both staged and unstaged changes
- Add detailed file listing in PR description
- Include comprehensive review checklist with build/lint checks
- Add fallback PR creation mechanism for error resilience
- Enhance success messaging with detailed implementation summary
- Add debugging output for change detection
- Include deployment instructions in PR template

Key improvements:
- More robust change detection
- Error handling with fallback PR creation
- Better PR descriptions with changed files list
- Enhanced issue update messages
- Quality check reminders

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:24:25 +02:00
7a3d6ec26e fix: restrict Claude workflows to only bvdaakster user
- Change issue implementation workflow to only allow bvdaakster
- Update code review workflow to only trigger for bvdaakster's PRs
- Update configuration to reflect single-user access
- Remove other privileged users from the list

Only bvdaakster can now:
- Trigger Claude issue implementations with @claude comments
- Have PRs automatically reviewed by Claude

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:20:39 +02:00
534b0e440f feat: add comprehensive user permission controls for Claude workflows
- Add multi-level permission checking for issue implementation workflow
- Support multiple permission strategies: privileged users, admins only, combined, org-based
- Add permission validation with detailed error messages
- Restrict code review workflow to privileged users and repository members
- Create permission configuration file (.github/claude-config.json)
- Add comprehensive permission documentation

Permission strategies available:
- Privileged users only (most restrictive)
- Repository admins only
- Admins OR privileged users (default)
- Organization members with write access
- Everyone with write access (least restrictive)

Current configuration:
- Issue implementation: admins OR privileged users (bastiaan, xtr-dev-team)
- Code reviews: privileged users and repository members only

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:16:51 +02:00
claude[bot]
669a9decd5 fix: export mollieProvider and stripeProvider from main package
- Add re-exports for mollieProvider and stripeProvider in src/index.ts
- Export related provider types: PaymentProvider, ProviderData
- Export provider config types: MollieProviderConfig, StripeProviderConfig
- Resolves issue where providers were not accessible despite being documented

Fixes #14

Co-authored-by: Bas <bvdaakster@users.noreply.github.com>
2025-09-18 19:15:54 +00:00
bfa214aed6 fix: make providerId optional and add version field to Payment type
- Update `providerId` to be optional in Payment interface for flexibility
- Add `version` field to support potential data versioning requirements
2025-09-18 21:06:03 +02:00
c083ae183c fix: update Claude issue workflow to use official anthropics/claude-code-action@beta
- Replace placeholder implementation with official Anthropic Claude Code action
- Update required secret from CLAUDE_API_KEY to CLAUDE_CODE_OAUTH_TOKEN
- Add id-token: write permission for Claude Code action
- Include allowed_tools for build, typecheck, lint, and test commands
- Update documentation with correct secret name and technical details

The workflow now uses the official Claude Code action for reliable,
production-ready issue implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 21:02:20 +02:00
d09fe3054a feat: add Claude issue implementation automation workflow
- Add GitHub workflow that triggers on issue comments with @claude implement
- Creates branches under claude/ namespace for each implementation
- Automatically creates PRs with Claude-generated implementations
- Includes permission checks and proper error handling
- Add comprehensive documentation for usage

Triggers:
- @claude implement
- @claude fix
- @claude create

Features:
- Unique branch naming: claude/issue-{number}-{timestamp}
- Permission validation (write access required)
- Automatic PR creation with detailed descriptions
- Progress tracking via issue comments
- Branch cleanup for failed implementations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 20:56:46 +02:00
Bas
50ab001e94 Merge pull request #13 from xtr-dev/dev
fix: resolve module resolution errors by replacing path aliases with …
2025-09-18 20:51:35 +02:00
29db6635b8 fix: resolve module resolution errors by replacing path aliases with relative imports
- Replace all @/ path aliases with proper relative imports and .js extensions
- Update @mollie/api-client peer dependency to support v4.x (^3.7.0 || ^4.0.0)
- Bump version to 0.1.5
- Ensure ESM compatibility for plugin distribution

Fixes module resolution error: "Cannot find package '@/collections'" when using
the plugin in external PayloadCMS projects.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 20:48:53 +02:00
22 changed files with 161 additions and 73 deletions

View File

@@ -12,11 +12,8 @@ on:
jobs: jobs:
claude-review: claude-review:
# Optional: Filter by PR author # Only allow bvdaakster to trigger reviews
# if: | if: github.event.pull_request.user.login == 'bvdaakster'
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:

View File

@@ -1,17 +1,19 @@
# @xtr-dev/payload-billing # @xtr-dev/payload-billing
A billing and payment provider plugin for PayloadCMS 3.x. Supports Stripe, Mollie, and local testing with comprehensive tracking. A billing and payment provider plugin for PayloadCMS 3.x. Supports Stripe, Mollie, and local testing with comprehensive tracking and flexible customer data management.
⚠️ **Pre-release Warning**: This package is currently in active development (v0.0.x). Breaking changes may occur before v1.0.0. Not recommended for production use. ⚠️ **Pre-release Warning**: This package is currently in active development (v0.1.x). Breaking changes may occur before v1.0.0. Not recommended for production use.
## Features ## Features
- 💳 Multiple payment providers (Stripe, Mollie, Test) - 💳 Multiple payment providers (Stripe, Mollie, Test)
- 🧾 Invoice generation and management - 🧾 Invoice generation and management with embedded customer info
- 👥 Flexible customer data management with relationship support
- 📊 Complete payment tracking and history - 📊 Complete payment tracking and history
- 🪝 Secure webhook processing for all providers - 🪝 Secure webhook processing for all providers
- 🧪 Built-in test provider for local development - 🧪 Built-in test provider for local development
- 📱 Payment management in PayloadCMS admin - 📱 Payment management in PayloadCMS admin
- 🔄 Callback-based customer data syncing
- 🔒 Full TypeScript support - 🔒 Full TypeScript support
## Installation ## Installation
@@ -42,6 +44,8 @@ pnpm add @mollie/api-client
## Quick Start ## Quick Start
### Basic Configuration
```typescript ```typescript
import { buildConfig } from 'payload' import { buildConfig } from 'payload'
import { billingPlugin, stripeProvider, mollieProvider } from '@xtr-dev/payload-billing' import { billingPlugin, stripeProvider, mollieProvider } from '@xtr-dev/payload-billing'
@@ -70,6 +74,68 @@ export default buildConfig({
}) })
``` ```
### With Customer Management
```typescript
import { billingPlugin, CustomerInfoExtractor } from '@xtr-dev/payload-billing'
// Define how to extract customer info from your customer collection
const customerExtractor: CustomerInfoExtractor = (customer) => ({
name: customer.name,
email: customer.email,
phone: customer.phone,
company: customer.company,
taxId: customer.taxId,
billingAddress: {
line1: customer.address.line1,
line2: customer.address.line2,
city: customer.address.city,
state: customer.address.state,
postalCode: customer.address.postalCode,
country: customer.address.country,
}
})
billingPlugin({
// ... providers
collections: {
payments: 'payments',
invoices: 'invoices',
refunds: 'refunds',
},
customerRelationSlug: 'customers', // Enable customer relationships
customerInfoExtractor: customerExtractor, // Auto-sync customer data
})
```
### Custom Customer Data Extraction
```typescript
import { CustomerInfoExtractor } from '@xtr-dev/payload-billing'
const customExtractor: CustomerInfoExtractor = (customer) => ({
name: customer.fullName,
email: customer.contactEmail,
phone: customer.phoneNumber,
company: customer.companyName,
taxId: customer.vatNumber,
billingAddress: {
line1: customer.billing.street,
line2: customer.billing.apartment,
city: customer.billing.city,
state: customer.billing.state,
postalCode: customer.billing.zip,
country: customer.billing.countryCode,
}
})
billingPlugin({
// ... other config
customerRelationSlug: 'clients',
customerInfoExtractor: customExtractor,
})
```
## Imports ## Imports
```typescript ```typescript
@@ -80,7 +146,17 @@ import { billingPlugin } from '@xtr-dev/payload-billing'
import { stripeProvider, mollieProvider } from '@xtr-dev/payload-billing' import { stripeProvider, mollieProvider } from '@xtr-dev/payload-billing'
// Types // Types
import type { PaymentProvider, Payment, Invoice, Refund } from '@xtr-dev/payload-billing' import type {
PaymentProvider,
Payment,
Invoice,
Refund,
BillingPluginConfig,
CustomerInfoExtractor,
MollieProviderConfig,
StripeProviderConfig,
ProviderData
} from '@xtr-dev/payload-billing'
``` ```
## Provider Types ## Provider Types
@@ -99,9 +175,19 @@ Local development testing with configurable scenarios, automatic completion, deb
The plugin adds these collections: The plugin adds these collections:
- **payments** - Payment transactions with status and provider data - **payments** - Payment transactions with status and provider data
- **invoices** - Invoice generation with line items and PDF support - **invoices** - Invoice generation with line items and embedded customer info
- **refunds** - Refund tracking and management - **refunds** - Refund tracking and management
### Customer Data Management
The plugin supports flexible customer data handling:
1. **With Customer Relationship + Extractor**: Customer relationship required, customer info auto-populated and read-only, syncs automatically when customer changes
2. **With Customer Relationship (no extractor)**: Customer relationship optional, customer info manually editable, either relationship OR customer info required
3. **No Customer Collection**: Customer info fields always required and editable, no relationship field available
## Webhook Endpoints ## Webhook Endpoints
Automatic webhook endpoints are created for configured providers: Automatic webhook endpoints are created for configured providers:

View File

@@ -158,7 +158,7 @@ export interface Payment {
/** /**
* The payment ID from the payment provider * The payment ID from the payment provider
*/ */
providerId: string; providerId?: string | null;
status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'refunded' | 'partially_refunded'; status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'refunded' | 'partially_refunded';
/** /**
* Amount in cents (e.g., 2000 = $20.00) * Amount in cents (e.g., 2000 = $20.00)
@@ -198,6 +198,7 @@ export interface Payment {
| boolean | boolean
| null; | null;
refunds?: (number | Refund)[] | null; refunds?: (number | Refund)[] | null;
version?: number | null;
updatedAt: string; updatedAt: string;
createdAt: string; createdAt: string;
} }
@@ -499,6 +500,7 @@ export interface PaymentsSelect<T extends boolean = true> {
metadata?: T; metadata?: T;
providerData?: T; providerData?: T;
refunds?: T; refunds?: T;
version?: T;
updatedAt?: T; updatedAt?: T;
createdAt?: T; createdAt?: T;
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@xtr-dev/payload-billing", "name": "@xtr-dev/payload-billing",
"version": "0.1.4", "version": "0.1.7",
"description": "PayloadCMS plugin for billing and payment provider integrations with tracking and local testing", "description": "PayloadCMS plugin for billing and payment provider integrations with tracking and local testing",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
@@ -106,7 +106,7 @@
"vitest": "^3.1.2" "vitest": "^3.1.2"
}, },
"peerDependencies": { "peerDependencies": {
"@mollie/api-client": "^3.7.0", "@mollie/api-client": "^3.7.0 || ^4.0.0",
"payload": "^3.37.0", "payload": "^3.37.0",
"stripe": "^18.5.0" "stripe": "^18.5.0"
}, },

View File

@@ -1,6 +1,6 @@
import type { Payment } from '@/plugin/types' import type { Payment } from '../plugin/types/index.js'
import type { Payload } from 'payload' import type { Payload } from 'payload'
import { useBillingPlugin } from '@/plugin' import { useBillingPlugin } from '../plugin/index.js'
export const initProviderPayment = (payload: Payload, payment: Partial<Payment>) => { export const initProviderPayment = (payload: Payload, payment: Partial<Payment>) => {
const billing = useBillingPlugin(payload) const billing = useBillingPlugin(payload)

View File

@@ -1,3 +1,3 @@
export { createInvoicesCollection } from './invoices' export { createInvoicesCollection } from './invoices.js'
export { createPaymentsCollection } from './payments' export { createPaymentsCollection } from './payments.js'
export { createRefundsCollection } from './refunds' export { createRefundsCollection } from './refunds.js'

View File

@@ -5,10 +5,10 @@ import {
CollectionBeforeValidateHook, CollectionBeforeValidateHook,
CollectionConfig, Field, CollectionConfig, Field,
} from 'payload' } from 'payload'
import type { BillingPluginConfig} from '@/plugin/config'; import type { BillingPluginConfig} from '../plugin/config.js';
import { defaults } from '@/plugin/config' import { defaults } from '../plugin/config.js'
import { extractSlug } from '@/plugin/utils' import { extractSlug } from '../plugin/utils.js'
import type { Invoice } from '@/plugin/types/invoices' import type { Invoice } from '../plugin/types/invoices.js'
export function createInvoicesCollection(pluginConfig: BillingPluginConfig): CollectionConfig { export function createInvoicesCollection(pluginConfig: BillingPluginConfig): CollectionConfig {
const {customerRelationSlug, customerInfoExtractor} = pluginConfig const {customerRelationSlug, customerInfoExtractor} = pluginConfig

View File

@@ -1,9 +1,9 @@
import type { AccessArgs, CollectionBeforeChangeHook, CollectionConfig, Field } from 'payload' import type { AccessArgs, CollectionBeforeChangeHook, CollectionConfig, Field } from 'payload'
import type { BillingPluginConfig} from '@/plugin/config'; import type { BillingPluginConfig} from '../plugin/config.js';
import { defaults } from '@/plugin/config' import { defaults } from '../plugin/config.js'
import { extractSlug } from '@/plugin/utils' import { extractSlug } from '../plugin/utils.js'
import type { Payment } from '@/plugin/types/payments' import type { Payment } from '../plugin/types/payments.js'
import { initProviderPayment } from '@/collections/hooks' import { initProviderPayment } from './hooks.js'
export function createPaymentsCollection(pluginConfig: BillingPluginConfig): CollectionConfig { export function createPaymentsCollection(pluginConfig: BillingPluginConfig): CollectionConfig {
const overrides = typeof pluginConfig.collections?.payments === 'object' ? pluginConfig.collections?.payments : {} const overrides = typeof pluginConfig.collections?.payments === 'object' ? pluginConfig.collections?.payments : {}

View File

@@ -1,7 +1,7 @@
import type { AccessArgs, CollectionConfig } from 'payload' import type { AccessArgs, CollectionConfig } from 'payload'
import { BillingPluginConfig, defaults } from '@/plugin/config' import { BillingPluginConfig, defaults } from '../plugin/config.js'
import { extractSlug } from '@/plugin/utils' import { extractSlug } from '../plugin/utils.js'
import { Payment } from '@/plugin/types' import { Payment } from '../plugin/types/index.js'
export function createRefundsCollection(pluginConfig: BillingPluginConfig): CollectionConfig { export function createRefundsCollection(pluginConfig: BillingPluginConfig): CollectionConfig {
// TODO: finish collection overrides // TODO: finish collection overrides

View File

@@ -1,4 +1,8 @@
export { billingPlugin } from './plugin' export { billingPlugin } from './plugin/index.js'
export type { BillingPluginConfig, CustomerInfoExtractor } from './plugin/config' export { mollieProvider, stripeProvider } from './providers/index.js'
export type { Invoice, Payment, Refund } from './plugin/types' export type { BillingPluginConfig, CustomerInfoExtractor } from './plugin/config.js'
export type { Invoice, Payment, Refund } from './plugin/types/index.js'
export type { PaymentProvider, ProviderData } from './providers/types.js'
export type { MollieProviderConfig } from './providers/mollie.js'
export type { StripeProviderConfig } from './providers/stripe.js'

View File

@@ -1,6 +1,6 @@
import { CollectionConfig } from 'payload' import { CollectionConfig } from 'payload'
import { FieldsOverride } from '@/plugin/utils' import { FieldsOverride } from './utils.js'
import { PaymentProvider } from '@/plugin/types' import { PaymentProvider } from './types/index.js'
export const defaults = { export const defaults = {
paymentsCollection: 'payments', paymentsCollection: 'payments',

View File

@@ -1,8 +1,8 @@
import { createInvoicesCollection, createPaymentsCollection, createRefundsCollection } from '@/collections' import { createInvoicesCollection, createPaymentsCollection, createRefundsCollection } from '../collections/index.js'
import type { BillingPluginConfig } from '@/plugin/config' import type { BillingPluginConfig } from './config.js'
import type { Config, Payload } from 'payload' import type { Config, Payload } from 'payload'
import { createSingleton } from '@/plugin/singleton' import { createSingleton } from './singleton.js'
import type { PaymentProvider } from '@/providers' import type { PaymentProvider } from '../providers/index.js'
const singleton = createSingleton(Symbol('billingPlugin')) const singleton = createSingleton(Symbol('billingPlugin'))

View File

@@ -1,5 +1,5 @@
export * from './id' export * from './id.js'
export * from './invoices' export * from './invoices.js'
export * from './payments' export * from './payments.js'
export * from './refunds' export * from './refunds.js'
export * from '../../providers/types' export * from '../../providers/types.js'

View File

@@ -1,6 +1,5 @@
import { Payment } from '@/plugin/types/payments' import { Payment } from './payments.js'
import { Id } from './id.js'
import { Id } from '@/plugin/types/id'
export interface Invoice<TCustomer = unknown> { export interface Invoice<TCustomer = unknown> {
id: Id; id: Id;

View File

@@ -1,6 +1,6 @@
import { Refund } from '@/plugin/types/refunds' import { Refund } from './refunds.js'
import { Invoice } from '@/plugin/types/invoices' import { Invoice } from './invoices.js'
import { Id } from '@/plugin/types/id' import { Id } from './id.js'
export interface Payment { export interface Payment {
id: Id; id: Id;

View File

@@ -1,4 +1,4 @@
import { Payment } from '@/plugin/types/payments' import { Payment } from './payments.js'
export interface Refund { export interface Refund {
id: number; id: number;

View File

@@ -1,5 +1,5 @@
import type { CollectionConfig, CollectionSlug, Field } from 'payload' import type { CollectionConfig, CollectionSlug, Field } from 'payload'
import type { Id } from '@/plugin/types' import type { Id } from './types/index.js'
export type FieldsOverride = (args: { defaultFields: Field[] }) => Field[] export type FieldsOverride = (args: { defaultFields: Field[] }) => Field[]

View File

@@ -1,4 +1,4 @@
export * from './mollie' export * from './mollie.js'
export * from './stripe' export * from './stripe.js'
export * from './types' export * from './types.js'
export * from './currency' export * from './currency.js'

View File

@@ -1,7 +1,7 @@
import type { Payment } from '@/plugin/types/payments' import type { Payment } from '../plugin/types/payments.js'
import type { PaymentProvider } from '@/plugin/types' import type { PaymentProvider } from '../plugin/types/index.js'
import type { Payload } from 'payload' import type { Payload } from 'payload'
import { createSingleton } from '@/plugin/singleton' import { createSingleton } from '../plugin/singleton.js'
import type { createMollieClient, MollieClient } from '@mollie/api-client' import type { createMollieClient, MollieClient } from '@mollie/api-client'
import { import {
webhookResponses, webhookResponses,
@@ -10,8 +10,8 @@ import {
updateInvoiceOnPaymentSuccess, updateInvoiceOnPaymentSuccess,
handleWebhookError, handleWebhookError,
validateProductionUrl validateProductionUrl
} from './utils' } from './utils.js'
import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency' import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency.js'
const symbol = Symbol('mollie') const symbol = Symbol('mollie')
export type MollieProviderConfig = Parameters<typeof createMollieClient>[0] export type MollieProviderConfig = Parameters<typeof createMollieClient>[0]

View File

@@ -1,7 +1,7 @@
import type { Payment } from '@/plugin/types/payments' import type { Payment } from '../plugin/types/payments.js'
import type { PaymentProvider, ProviderData } from '@/plugin/types' import type { PaymentProvider, ProviderData } from '../plugin/types/index.js'
import type { Payload } from 'payload' import type { Payload } from 'payload'
import { createSingleton } from '@/plugin/singleton' import { createSingleton } from '../plugin/singleton.js'
import type Stripe from 'stripe' import type Stripe from 'stripe'
import { import {
webhookResponses, webhookResponses,
@@ -10,8 +10,8 @@ import {
updateInvoiceOnPaymentSuccess, updateInvoiceOnPaymentSuccess,
handleWebhookError, handleWebhookError,
logWebhookEvent logWebhookEvent
} from './utils' } from './utils.js'
import { isValidAmount, isValidCurrencyCode } from './currency' import { isValidAmount, isValidCurrencyCode } from './currency.js'
const symbol = Symbol('stripe') const symbol = Symbol('stripe')

View File

@@ -1,6 +1,6 @@
import type { Payment } from '@/plugin/types/payments' import type { Payment } from '../plugin/types/payments.js'
import type { Config, Payload } from 'payload' import type { Config, Payload } from 'payload'
import type { BillingPluginConfig } from '@/plugin/config' import type { BillingPluginConfig } from '../plugin/config.js'
export type InitPayment = (payload: Payload, payment: Partial<Payment>) => Promise<Partial<Payment>> export type InitPayment = (payload: Payload, payment: Partial<Payment>) => Promise<Partial<Payment>>

View File

@@ -1,9 +1,9 @@
import type { Payload } from 'payload' import type { Payload } from 'payload'
import type { Payment } from '@/plugin/types/payments' import type { Payment } from '../plugin/types/payments.js'
import type { BillingPluginConfig } from '@/plugin/config' import type { BillingPluginConfig } from '../plugin/config.js'
import type { ProviderData } from './types' import type { ProviderData } from './types.js'
import { defaults } from '@/plugin/config' import { defaults } from '../plugin/config.js'
import { extractSlug, toPayloadId } from '@/plugin/utils' import { extractSlug, toPayloadId } from '../plugin/utils.js'
/** /**
* Common webhook response utilities * Common webhook response utilities