@djangocfg/ext-payments 1.0.1 → 1.0.3
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 +2 -0
- package/dist/config.cjs +172 -0
- package/dist/config.d.cts +8 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.js +148 -0
- package/dist/hooks.cjs +2811 -0
- package/dist/hooks.d.cts +187 -0
- package/dist/hooks.d.ts +187 -0
- package/dist/hooks.js +2737 -0
- package/dist/index.cjs +2735 -0
- package/dist/index.d.cts +1293 -0
- package/dist/index.d.ts +1293 -0
- package/dist/index.js +2681 -0
- package/package.json +9 -4
- package/src/config.ts +0 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
+
**[📦 View in Marketplace](https://hub.djangocfg.com/extensions/djangocfg-ext-payments)** • **[📖 Documentation](https://djangocfg.com)** • **[⭐ GitHub](https://github.com/markolofsen/django-cfg)**
|
|
6
|
+
|
|
5
7
|
</div>
|
|
6
8
|
|
|
7
9
|
# @djangocfg/ext-payments
|
package/dist/config.cjs
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/config.ts
|
|
20
|
+
var config_exports = {};
|
|
21
|
+
__export(config_exports, {
|
|
22
|
+
extensionConfig: () => extensionConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(config_exports);
|
|
25
|
+
var import_ext_base = require("@djangocfg/ext-base");
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var package_default = {
|
|
29
|
+
name: "@djangocfg/ext-payments",
|
|
30
|
+
version: "1.0.3",
|
|
31
|
+
description: "Payments system extension for DjangoCFG",
|
|
32
|
+
keywords: [
|
|
33
|
+
"django",
|
|
34
|
+
"djangocfg",
|
|
35
|
+
"extension",
|
|
36
|
+
"payments",
|
|
37
|
+
"stripe",
|
|
38
|
+
"billing",
|
|
39
|
+
"subscription",
|
|
40
|
+
"typescript",
|
|
41
|
+
"react"
|
|
42
|
+
],
|
|
43
|
+
author: {
|
|
44
|
+
name: "DjangoCFG",
|
|
45
|
+
url: "https://djangocfg.com"
|
|
46
|
+
},
|
|
47
|
+
homepage: "https://hub.djangocfg.com/extensions/djangocfg-ext-payments",
|
|
48
|
+
repository: {
|
|
49
|
+
type: "git",
|
|
50
|
+
url: "https://github.com/markolofsen/django-cfg.git",
|
|
51
|
+
directory: "extensions/payments"
|
|
52
|
+
},
|
|
53
|
+
bugs: {
|
|
54
|
+
url: "https://github.com/markolofsen/django-cfg/issues"
|
|
55
|
+
},
|
|
56
|
+
license: "MIT",
|
|
57
|
+
type: "module",
|
|
58
|
+
main: "./dist/index.cjs",
|
|
59
|
+
module: "./dist/index.js",
|
|
60
|
+
types: "./dist/index.d.ts",
|
|
61
|
+
exports: {
|
|
62
|
+
".": {
|
|
63
|
+
types: "./dist/index.d.ts",
|
|
64
|
+
import: "./dist/index.js",
|
|
65
|
+
require: "./dist/index.cjs"
|
|
66
|
+
},
|
|
67
|
+
"./hooks": {
|
|
68
|
+
types: "./dist/hooks.d.ts",
|
|
69
|
+
import: "./dist/hooks.js",
|
|
70
|
+
require: "./dist/hooks.cjs"
|
|
71
|
+
},
|
|
72
|
+
"./config": {
|
|
73
|
+
types: "./dist/config.d.ts",
|
|
74
|
+
import: "./dist/config.js",
|
|
75
|
+
require: "./dist/config.cjs"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
files: [
|
|
79
|
+
"dist",
|
|
80
|
+
"src",
|
|
81
|
+
"preview.png"
|
|
82
|
+
],
|
|
83
|
+
scripts: {
|
|
84
|
+
build: "tsup",
|
|
85
|
+
dev: "tsup --watch",
|
|
86
|
+
check: "tsc --noEmit"
|
|
87
|
+
},
|
|
88
|
+
peerDependencies: {
|
|
89
|
+
"@djangocfg/api": "workspace:*",
|
|
90
|
+
"@djangocfg/ext-base": "workspace:*",
|
|
91
|
+
"@djangocfg/ui-nextjs": "workspace:*",
|
|
92
|
+
consola: "^3.4.2",
|
|
93
|
+
"lucide-react": "^0.545.0",
|
|
94
|
+
next: "^15.5.7",
|
|
95
|
+
"p-retry": "^7.0.0",
|
|
96
|
+
react: "^18 || ^19",
|
|
97
|
+
swr: "^2.3.7",
|
|
98
|
+
zod: "^4.1.13"
|
|
99
|
+
},
|
|
100
|
+
devDependencies: {
|
|
101
|
+
"@djangocfg/api": "workspace:*",
|
|
102
|
+
"@djangocfg/ext-base": "workspace:*",
|
|
103
|
+
"@djangocfg/typescript-config": "workspace:*",
|
|
104
|
+
"@types/node": "^24.7.2",
|
|
105
|
+
"@types/react": "^19.0.0",
|
|
106
|
+
consola: "^3.4.2",
|
|
107
|
+
"p-retry": "^7.0.0",
|
|
108
|
+
swr: "^2.3.7",
|
|
109
|
+
tsup: "^8.5.0",
|
|
110
|
+
typescript: "^5.9.3"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// src/config.ts
|
|
115
|
+
var extensionConfig = (0, import_ext_base.createExtensionConfig)(package_default, {
|
|
116
|
+
name: "payments",
|
|
117
|
+
displayName: "Payments & Billing",
|
|
118
|
+
category: "payments",
|
|
119
|
+
features: [
|
|
120
|
+
"Multiple payment providers",
|
|
121
|
+
"Stripe integration",
|
|
122
|
+
"Cryptocurrency payments (NowPayments)",
|
|
123
|
+
"Subscription management",
|
|
124
|
+
"Payment tracking",
|
|
125
|
+
"Invoice generation"
|
|
126
|
+
],
|
|
127
|
+
minVersion: "2.0.0",
|
|
128
|
+
examples: [
|
|
129
|
+
{
|
|
130
|
+
title: "Stripe Payment Form",
|
|
131
|
+
description: "Accept payments with Stripe",
|
|
132
|
+
code: `import { PaymentForm, usePayment } from '@djangocfg/ext-payments';
|
|
133
|
+
|
|
134
|
+
export default function CheckoutPage() {
|
|
135
|
+
const { processPayment, isProcessing } = usePayment();
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<PaymentForm
|
|
139
|
+
amount={9900}
|
|
140
|
+
currency="usd"
|
|
141
|
+
onSuccess={(paymentIntent) => {
|
|
142
|
+
console.log('Payment successful!', paymentIntent);
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
);
|
|
146
|
+
}`,
|
|
147
|
+
language: "tsx"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
title: "Cryptocurrency Payment",
|
|
151
|
+
description: "Accept crypto payments via NowPayments",
|
|
152
|
+
code: `import { CryptoPayment } from '@djangocfg/ext-payments';
|
|
153
|
+
|
|
154
|
+
export default function CryptoCheckout() {
|
|
155
|
+
return (
|
|
156
|
+
<CryptoPayment
|
|
157
|
+
amount={100}
|
|
158
|
+
currency="USDT"
|
|
159
|
+
onPaymentCreated={(payment) => {
|
|
160
|
+
console.log('Payment created:', payment.paymentUrl);
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
163
|
+
);
|
|
164
|
+
}`,
|
|
165
|
+
language: "tsx"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
170
|
+
0 && (module.exports = {
|
|
171
|
+
extensionConfig
|
|
172
|
+
});
|
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
import { createExtensionConfig } from "@djangocfg/ext-base";
|
|
3
|
+
|
|
4
|
+
// package.json
|
|
5
|
+
var package_default = {
|
|
6
|
+
name: "@djangocfg/ext-payments",
|
|
7
|
+
version: "1.0.3",
|
|
8
|
+
description: "Payments system extension for DjangoCFG",
|
|
9
|
+
keywords: [
|
|
10
|
+
"django",
|
|
11
|
+
"djangocfg",
|
|
12
|
+
"extension",
|
|
13
|
+
"payments",
|
|
14
|
+
"stripe",
|
|
15
|
+
"billing",
|
|
16
|
+
"subscription",
|
|
17
|
+
"typescript",
|
|
18
|
+
"react"
|
|
19
|
+
],
|
|
20
|
+
author: {
|
|
21
|
+
name: "DjangoCFG",
|
|
22
|
+
url: "https://djangocfg.com"
|
|
23
|
+
},
|
|
24
|
+
homepage: "https://hub.djangocfg.com/extensions/djangocfg-ext-payments",
|
|
25
|
+
repository: {
|
|
26
|
+
type: "git",
|
|
27
|
+
url: "https://github.com/markolofsen/django-cfg.git",
|
|
28
|
+
directory: "extensions/payments"
|
|
29
|
+
},
|
|
30
|
+
bugs: {
|
|
31
|
+
url: "https://github.com/markolofsen/django-cfg/issues"
|
|
32
|
+
},
|
|
33
|
+
license: "MIT",
|
|
34
|
+
type: "module",
|
|
35
|
+
main: "./dist/index.cjs",
|
|
36
|
+
module: "./dist/index.js",
|
|
37
|
+
types: "./dist/index.d.ts",
|
|
38
|
+
exports: {
|
|
39
|
+
".": {
|
|
40
|
+
types: "./dist/index.d.ts",
|
|
41
|
+
import: "./dist/index.js",
|
|
42
|
+
require: "./dist/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./hooks": {
|
|
45
|
+
types: "./dist/hooks.d.ts",
|
|
46
|
+
import: "./dist/hooks.js",
|
|
47
|
+
require: "./dist/hooks.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./config": {
|
|
50
|
+
types: "./dist/config.d.ts",
|
|
51
|
+
import: "./dist/config.js",
|
|
52
|
+
require: "./dist/config.cjs"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
files: [
|
|
56
|
+
"dist",
|
|
57
|
+
"src",
|
|
58
|
+
"preview.png"
|
|
59
|
+
],
|
|
60
|
+
scripts: {
|
|
61
|
+
build: "tsup",
|
|
62
|
+
dev: "tsup --watch",
|
|
63
|
+
check: "tsc --noEmit"
|
|
64
|
+
},
|
|
65
|
+
peerDependencies: {
|
|
66
|
+
"@djangocfg/api": "workspace:*",
|
|
67
|
+
"@djangocfg/ext-base": "workspace:*",
|
|
68
|
+
"@djangocfg/ui-nextjs": "workspace:*",
|
|
69
|
+
consola: "^3.4.2",
|
|
70
|
+
"lucide-react": "^0.545.0",
|
|
71
|
+
next: "^15.5.7",
|
|
72
|
+
"p-retry": "^7.0.0",
|
|
73
|
+
react: "^18 || ^19",
|
|
74
|
+
swr: "^2.3.7",
|
|
75
|
+
zod: "^4.1.13"
|
|
76
|
+
},
|
|
77
|
+
devDependencies: {
|
|
78
|
+
"@djangocfg/api": "workspace:*",
|
|
79
|
+
"@djangocfg/ext-base": "workspace:*",
|
|
80
|
+
"@djangocfg/typescript-config": "workspace:*",
|
|
81
|
+
"@types/node": "^24.7.2",
|
|
82
|
+
"@types/react": "^19.0.0",
|
|
83
|
+
consola: "^3.4.2",
|
|
84
|
+
"p-retry": "^7.0.0",
|
|
85
|
+
swr: "^2.3.7",
|
|
86
|
+
tsup: "^8.5.0",
|
|
87
|
+
typescript: "^5.9.3"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// src/config.ts
|
|
92
|
+
var extensionConfig = createExtensionConfig(package_default, {
|
|
93
|
+
name: "payments",
|
|
94
|
+
displayName: "Payments & Billing",
|
|
95
|
+
category: "payments",
|
|
96
|
+
features: [
|
|
97
|
+
"Multiple payment providers",
|
|
98
|
+
"Stripe integration",
|
|
99
|
+
"Cryptocurrency payments (NowPayments)",
|
|
100
|
+
"Subscription management",
|
|
101
|
+
"Payment tracking",
|
|
102
|
+
"Invoice generation"
|
|
103
|
+
],
|
|
104
|
+
minVersion: "2.0.0",
|
|
105
|
+
examples: [
|
|
106
|
+
{
|
|
107
|
+
title: "Stripe Payment Form",
|
|
108
|
+
description: "Accept payments with Stripe",
|
|
109
|
+
code: `import { PaymentForm, usePayment } from '@djangocfg/ext-payments';
|
|
110
|
+
|
|
111
|
+
export default function CheckoutPage() {
|
|
112
|
+
const { processPayment, isProcessing } = usePayment();
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<PaymentForm
|
|
116
|
+
amount={9900}
|
|
117
|
+
currency="usd"
|
|
118
|
+
onSuccess={(paymentIntent) => {
|
|
119
|
+
console.log('Payment successful!', paymentIntent);
|
|
120
|
+
}}
|
|
121
|
+
/>
|
|
122
|
+
);
|
|
123
|
+
}`,
|
|
124
|
+
language: "tsx"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: "Cryptocurrency Payment",
|
|
128
|
+
description: "Accept crypto payments via NowPayments",
|
|
129
|
+
code: `import { CryptoPayment } from '@djangocfg/ext-payments';
|
|
130
|
+
|
|
131
|
+
export default function CryptoCheckout() {
|
|
132
|
+
return (
|
|
133
|
+
<CryptoPayment
|
|
134
|
+
amount={100}
|
|
135
|
+
currency="USDT"
|
|
136
|
+
onPaymentCreated={(payment) => {
|
|
137
|
+
console.log('Payment created:', payment.paymentUrl);
|
|
138
|
+
}}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
}`,
|
|
142
|
+
language: "tsx"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
export {
|
|
147
|
+
extensionConfig
|
|
148
|
+
};
|