@djangocfg/ext-payments 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ <div align="center">
2
+
3
+ ![DjangoCFG Extension Preview](https://unpkg.com/@djangocfg/ext-payments@latest/preview.png)
4
+
5
+ </div>
6
+
1
7
  # @djangocfg/ext-payments
2
8
 
3
9
  Payment processing and subscription management extension for DjangoCFG.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ext-payments",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Payments system extension for DjangoCFG",
5
5
  "keywords": [
6
6
  "django",
@@ -29,23 +29,24 @@
29
29
  "license": "MIT",
30
30
  "type": "module",
31
31
  "main": "./dist/index.cjs",
32
- "module": "./dist/index.mjs",
32
+ "module": "./dist/index.js",
33
33
  "types": "./dist/index.d.ts",
34
34
  "exports": {
35
35
  ".": {
36
36
  "types": "./dist/index.d.ts",
37
- "import": "./dist/index.mjs",
37
+ "import": "./dist/index.js",
38
38
  "require": "./dist/index.cjs"
39
39
  },
40
40
  "./hooks": {
41
41
  "types": "./dist/hooks.d.ts",
42
- "import": "./dist/hooks.mjs",
42
+ "import": "./dist/hooks.js",
43
43
  "require": "./dist/hooks.cjs"
44
44
  }
45
45
  },
46
46
  "files": [
47
47
  "dist",
48
- "src"
48
+ "src",
49
+ "preview.png"
49
50
  ],
50
51
  "scripts": {
51
52
  "build": "tsup",
@@ -53,9 +54,9 @@
53
54
  "check": "tsc --noEmit"
54
55
  },
55
56
  "peerDependencies": {
56
- "@djangocfg/api": "^2.1.14",
57
- "@djangocfg/ext-base": "^1.0.0",
58
- "@djangocfg/ui-nextjs": "^2.1.14",
57
+ "@djangocfg/api": "^2.1.15",
58
+ "@djangocfg/ext-base": "^1.0.2",
59
+ "@djangocfg/ui-nextjs": "^2.1.15",
59
60
  "consola": "^3.4.2",
60
61
  "lucide-react": "^0.545.0",
61
62
  "next": "^15.5.7",
@@ -65,9 +66,9 @@
65
66
  "zod": "^4.1.13"
66
67
  },
67
68
  "devDependencies": {
68
- "@djangocfg/api": "^2.1.14",
69
- "@djangocfg/ext-base": "^1.0.0",
70
- "@djangocfg/typescript-config": "^2.1.14",
69
+ "@djangocfg/api": "^2.1.15",
70
+ "@djangocfg/ext-base": "^1.0.2",
71
+ "@djangocfg/typescript-config": "^2.1.15",
71
72
  "@types/node": "^24.7.2",
72
73
  "@types/react": "^19.0.0",
73
74
  "consola": "^3.4.2",
package/preview.png ADDED
Binary file
package/src/config.ts CHANGED
@@ -2,19 +2,61 @@
2
2
  * Payments extension configuration
3
3
  */
4
4
 
5
- import type { ExtensionMetadata } from '@djangocfg/ext-base';
5
+ import { createExtensionConfig } from '@djangocfg/ext-base';
6
+ import packageJson from '../package.json';
6
7
 
7
- export const extensionConfig: ExtensionMetadata = {
8
+ export const extensionConfig = createExtensionConfig(packageJson, {
8
9
  name: 'payments',
9
- version: '1.0.0',
10
- author: 'DjangoCFG',
11
- displayName: 'Payments',
12
- description: 'Payment processing and subscription management',
13
- icon: '💳',
14
- license: 'MIT',
15
- githubUrl: 'https://github.com/markolofsen/django-cfg',
16
- homepage: 'https://djangocfg.com',
17
- keywords: ['payments', 'subscriptions', 'billing', 'checkout', 'stripe'],
18
- dependencies: [],
10
+ displayName: 'Payments & Billing',
11
+ icon: 'CreditCard',
12
+ category: 'payments',
13
+ features: [
14
+ 'Multiple payment providers',
15
+ 'Stripe integration',
16
+ 'Cryptocurrency payments (NowPayments)',
17
+ 'Subscription management',
18
+ 'Payment tracking',
19
+ 'Invoice generation',
20
+ ],
19
21
  minVersion: '2.0.0',
20
- } as const;
22
+ examples: [
23
+ {
24
+ title: 'Stripe Payment Form',
25
+ description: 'Accept payments with Stripe',
26
+ code: `import { PaymentForm, usePayment } from '@djangocfg/ext-payments';
27
+
28
+ export default function CheckoutPage() {
29
+ const { processPayment, isProcessing } = usePayment();
30
+
31
+ return (
32
+ <PaymentForm
33
+ amount={9900}
34
+ currency="usd"
35
+ onSuccess={(paymentIntent) => {
36
+ console.log('Payment successful!', paymentIntent);
37
+ }}
38
+ />
39
+ );
40
+ }`,
41
+ language: 'tsx',
42
+ },
43
+ {
44
+ title: 'Cryptocurrency Payment',
45
+ description: 'Accept crypto payments via NowPayments',
46
+ code: `import { CryptoPayment } from '@djangocfg/ext-payments';
47
+
48
+ export default function CryptoCheckout() {
49
+ return (
50
+ <CryptoPayment
51
+ amount={100}
52
+ currency="USDT"
53
+ onPaymentCreated={(payment) => {
54
+ console.log('Payment created:', payment.paymentUrl);
55
+ }}
56
+ />
57
+ );
58
+ }`,
59
+ language: 'tsx',
60
+ },
61
+ ],
62
+ });
package/src/index.ts CHANGED
@@ -34,3 +34,5 @@ export type {
34
34
 
35
35
  // Note: Hooks are NOT exported here to keep this bundle server-safe
36
36
  // Use: import { usePaymentsList } from '@djangocfg/ext-payments/hooks'
37
+ // Export config
38
+ export { extensionConfig } from './config';