@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 +6 -0
- package/package.json +12 -11
- package/preview.png +0 -0
- package/src/config.ts +55 -13
- package/src/index.ts +2 -0
- package/dist/chunk-5KY6HVXF.js +0 -2593
- package/dist/hooks.cjs +0 -2666
- package/dist/hooks.d.cts +0 -186
- package/dist/hooks.d.ts +0 -186
- package/dist/hooks.js +0 -1
- package/dist/index.cjs +0 -2590
- package/dist/index.d.cts +0 -1287
- package/dist/index.d.ts +0 -1287
- package/dist/index.js +0 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ext-payments",
|
|
3
|
-
"version": "1.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.
|
|
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.
|
|
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.
|
|
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.
|
|
57
|
-
"@djangocfg/ext-base": "^1.0.
|
|
58
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
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.
|
|
69
|
-
"@djangocfg/ext-base": "^1.0.
|
|
70
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
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
|
|
5
|
+
import { createExtensionConfig } from '@djangocfg/ext-base';
|
|
6
|
+
import packageJson from '../package.json';
|
|
6
7
|
|
|
7
|
-
export const extensionConfig
|
|
8
|
+
export const extensionConfig = createExtensionConfig(packageJson, {
|
|
8
9
|
name: 'payments',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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
|
+
});
|