@reeboot/strapi-payment-plugin 0.0.0
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 +112 -0
- package/dist/_chunks/App-BGle38NN.js +1149 -0
- package/dist/_chunks/App-DoUUpjp-.mjs +1149 -0
- package/dist/_chunks/en-B4KWt_jN.js +4 -0
- package/dist/_chunks/en-Byx4XI2L.mjs +4 -0
- package/dist/admin/index.js +64 -0
- package/dist/admin/index.mjs +65 -0
- package/dist/admin/src/components/Header.d.ts +2 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/components/NavigationMenu.d.ts +2 -0
- package/dist/admin/src/components/PluginIcon.d.ts +2 -0
- package/dist/admin/src/components/Sidebar.d.ts +2 -0
- package/dist/admin/src/components/TransactionDetailsModal.d.ts +18 -0
- package/dist/admin/src/components/TransactionList.d.ts +18 -0
- package/dist/admin/src/index.d.ts +10 -0
- package/dist/admin/src/pages/App.d.ts +2 -0
- package/dist/admin/src/pages/ConfigurationPage.d.ts +2 -0
- package/dist/admin/src/pages/DashboardPage.d.ts +2 -0
- package/dist/admin/src/pages/HomePage.d.ts +2 -0
- package/dist/admin/src/pages/ProductsPage.d.ts +2 -0
- package/dist/admin/src/pages/SubscriptionsPage.d.ts +2 -0
- package/dist/admin/src/pages/TransactionsPage.d.ts +2 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/utils/getTranslation.d.ts +2 -0
- package/dist/server/controllers/product.d.ts +12 -0
- package/dist/server/controllers/subscription.d.ts +12 -0
- package/dist/server/index.js +7287 -0
- package/dist/server/index.mjs +7286 -0
- package/dist/server/services/product.d.ts +7 -0
- package/dist/server/services/subscription.d.ts +7 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +13 -0
- package/dist/server/src/content-types/index.d.ts +2 -0
- package/dist/server/src/controllers/controller.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts +41 -0
- package/dist/server/src/controllers/productController.d.ts +9 -0
- package/dist/server/src/controllers/subscriptionController.d.ts +9 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +159 -0
- package/dist/server/src/middlewares/index.d.ts +2 -0
- package/dist/server/src/policies/index.d.ts +2 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin-routes.d.ts +13 -0
- package/dist/server/src/routes/content-api.d.ts +12 -0
- package/dist/server/src/routes/index.d.ts +51 -0
- package/dist/server/src/routes/product-routes.d.ts +13 -0
- package/dist/server/src/routes/refund-routes.d.ts +13 -0
- package/dist/server/src/routes/subscription-routes.d.ts +13 -0
- package/dist/server/src/services/index.d.ts +41 -0
- package/dist/server/src/services/paypalDriver.d.ts +7 -0
- package/dist/server/src/services/service.d.ts +33 -0
- package/dist/server/src/services/stripeDriver.d.ts +290 -0
- package/jest.config.js +13 -0
- package/package.json +75 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* service
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: ({ strapi, }: {
|
|
5
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
6
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* service
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: ({ strapi, }: {
|
|
5
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
6
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
initiatePayment(ctx: any): Promise<void>;
|
|
3
|
+
processWebhook(ctx: any): Promise<void>;
|
|
4
|
+
refundPayment(ctx: any): Promise<void>;
|
|
5
|
+
getPaymentDetails(ctx: any): Promise<void>;
|
|
6
|
+
getTransactions(ctx: any): Promise<void>;
|
|
7
|
+
saveConfiguration(ctx: any): Promise<void>;
|
|
8
|
+
getConfigStatus(ctx: any): Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="koa" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
controller: {
|
|
4
|
+
initiatePayment(ctx: any): Promise<void>;
|
|
5
|
+
processWebhook(ctx: any): Promise<void>;
|
|
6
|
+
refundPayment(ctx: any): Promise<void>;
|
|
7
|
+
getPaymentDetails(ctx: any): Promise<void>;
|
|
8
|
+
getTransactions(ctx: any): Promise<void>;
|
|
9
|
+
saveConfiguration(ctx: any): Promise<void>;
|
|
10
|
+
getConfigStatus(ctx: any): Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
productController: {
|
|
13
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
14
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
15
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
16
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
17
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
subscriptionController: {
|
|
20
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
21
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
22
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
23
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
24
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
product: {
|
|
27
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
28
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
29
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
30
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
31
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
subscription: {
|
|
34
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
35
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
36
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
37
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
38
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from 'koa';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
find(ctx: Context): Promise<void>;
|
|
4
|
+
findOne(ctx: Context): Promise<Context>;
|
|
5
|
+
create(ctx: Context): Promise<void>;
|
|
6
|
+
update(ctx: Context): Promise<void>;
|
|
7
|
+
delete(ctx: Context): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from 'koa';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
find(ctx: Context): Promise<void>;
|
|
4
|
+
findOne(ctx: Context): Promise<Context>;
|
|
5
|
+
create(ctx: Context): Promise<void>;
|
|
6
|
+
update(ctx: Context): Promise<void>;
|
|
7
|
+
delete(ctx: Context): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/// <reference types="koa" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
register: ({ strapi }: {
|
|
4
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
5
|
+
}) => void;
|
|
6
|
+
bootstrap: ({ strapi }: {
|
|
7
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
8
|
+
}) => void;
|
|
9
|
+
destroy: ({ strapi }: {
|
|
10
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
11
|
+
}) => void;
|
|
12
|
+
config: {
|
|
13
|
+
stripe: {
|
|
14
|
+
secretKey: string;
|
|
15
|
+
publishableKey: string;
|
|
16
|
+
webhookSecret: string;
|
|
17
|
+
};
|
|
18
|
+
paypal: {
|
|
19
|
+
clientId: string;
|
|
20
|
+
clientSecret: string;
|
|
21
|
+
webhookId: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
controllers: {
|
|
25
|
+
controller: {
|
|
26
|
+
initiatePayment(ctx: any): Promise<void>;
|
|
27
|
+
processWebhook(ctx: any): Promise<void>;
|
|
28
|
+
refundPayment(ctx: any): Promise<void>;
|
|
29
|
+
getPaymentDetails(ctx: any): Promise<void>;
|
|
30
|
+
getTransactions(ctx: any): Promise<void>;
|
|
31
|
+
saveConfiguration(ctx: any): Promise<void>;
|
|
32
|
+
getConfigStatus(ctx: any): Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
productController: {
|
|
35
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
36
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
37
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
38
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
39
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
subscriptionController: {
|
|
42
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
43
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
44
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
45
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
46
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
47
|
+
};
|
|
48
|
+
product: {
|
|
49
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
50
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
51
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
52
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
53
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
54
|
+
};
|
|
55
|
+
subscription: {
|
|
56
|
+
find(ctx: import("koa").Context): Promise<void>;
|
|
57
|
+
findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
58
|
+
create(ctx: import("koa").Context): Promise<void>;
|
|
59
|
+
update(ctx: import("koa").Context): Promise<void>;
|
|
60
|
+
delete(ctx: import("koa").Context): Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
routes: {
|
|
64
|
+
adminRoutes: {
|
|
65
|
+
type: string;
|
|
66
|
+
routes: {
|
|
67
|
+
method: string;
|
|
68
|
+
path: string;
|
|
69
|
+
handler: string;
|
|
70
|
+
config: {
|
|
71
|
+
policies: any[];
|
|
72
|
+
auth: boolean;
|
|
73
|
+
};
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
productRoutes: {
|
|
77
|
+
type: string;
|
|
78
|
+
routes: {
|
|
79
|
+
method: string;
|
|
80
|
+
path: string;
|
|
81
|
+
handler: string; /**
|
|
82
|
+
* Plugin server methods
|
|
83
|
+
*/
|
|
84
|
+
config: {
|
|
85
|
+
policies: any[];
|
|
86
|
+
auth: boolean;
|
|
87
|
+
};
|
|
88
|
+
}[];
|
|
89
|
+
};
|
|
90
|
+
subscriptionRoutes: {
|
|
91
|
+
type: string;
|
|
92
|
+
routes: {
|
|
93
|
+
method: string;
|
|
94
|
+
path: string;
|
|
95
|
+
handler: string;
|
|
96
|
+
config: {
|
|
97
|
+
policies: any[];
|
|
98
|
+
auth: boolean;
|
|
99
|
+
};
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
refundRoutes: {
|
|
103
|
+
type: string;
|
|
104
|
+
routes: {
|
|
105
|
+
method: string;
|
|
106
|
+
path: string;
|
|
107
|
+
handler: string;
|
|
108
|
+
config: {
|
|
109
|
+
policies: any[];
|
|
110
|
+
auth: boolean;
|
|
111
|
+
};
|
|
112
|
+
}[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
services: {
|
|
116
|
+
service: {
|
|
117
|
+
initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
118
|
+
processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
|
|
119
|
+
refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
|
|
120
|
+
getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
|
|
121
|
+
getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
|
|
122
|
+
data: {
|
|
123
|
+
id: string;
|
|
124
|
+
amount: number;
|
|
125
|
+
currency: string;
|
|
126
|
+
status: string;
|
|
127
|
+
date: string;
|
|
128
|
+
customer: string;
|
|
129
|
+
paymentMethod: string;
|
|
130
|
+
gateway: any;
|
|
131
|
+
}[];
|
|
132
|
+
meta: {
|
|
133
|
+
total: number;
|
|
134
|
+
limit: any;
|
|
135
|
+
offset: any;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
saveConfiguration(configData: any): Promise<{
|
|
139
|
+
success: boolean;
|
|
140
|
+
message: string;
|
|
141
|
+
data: any;
|
|
142
|
+
}>;
|
|
143
|
+
getConfigStatus(): Promise<{
|
|
144
|
+
stripe: boolean;
|
|
145
|
+
paypal: boolean;
|
|
146
|
+
}>;
|
|
147
|
+
};
|
|
148
|
+
product: ({ strapi, }: {
|
|
149
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
150
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
151
|
+
subscription: ({ strapi, }: {
|
|
152
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
153
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
154
|
+
};
|
|
155
|
+
contentTypes: {};
|
|
156
|
+
policies: {};
|
|
157
|
+
middlewares: {};
|
|
158
|
+
};
|
|
159
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
adminRoutes: {
|
|
3
|
+
type: string;
|
|
4
|
+
routes: {
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
handler: string;
|
|
8
|
+
config: {
|
|
9
|
+
policies: any[];
|
|
10
|
+
auth: boolean;
|
|
11
|
+
};
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
productRoutes: {
|
|
15
|
+
type: string;
|
|
16
|
+
routes: {
|
|
17
|
+
method: string;
|
|
18
|
+
path: string;
|
|
19
|
+
handler: string;
|
|
20
|
+
config: {
|
|
21
|
+
policies: any[];
|
|
22
|
+
auth: boolean;
|
|
23
|
+
};
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
subscriptionRoutes: {
|
|
27
|
+
type: string;
|
|
28
|
+
routes: {
|
|
29
|
+
method: string;
|
|
30
|
+
path: string;
|
|
31
|
+
handler: string;
|
|
32
|
+
config: {
|
|
33
|
+
policies: any[];
|
|
34
|
+
auth: boolean;
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
refundRoutes: {
|
|
39
|
+
type: string;
|
|
40
|
+
routes: {
|
|
41
|
+
method: string;
|
|
42
|
+
path: string;
|
|
43
|
+
handler: string;
|
|
44
|
+
config: {
|
|
45
|
+
policies: any[];
|
|
46
|
+
auth: boolean;
|
|
47
|
+
};
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
service: {
|
|
3
|
+
initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
4
|
+
processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
|
|
5
|
+
refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
|
|
6
|
+
getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
|
|
7
|
+
getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
|
|
8
|
+
data: {
|
|
9
|
+
id: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
status: string;
|
|
13
|
+
date: string;
|
|
14
|
+
customer: string;
|
|
15
|
+
paymentMethod: string;
|
|
16
|
+
gateway: any;
|
|
17
|
+
}[];
|
|
18
|
+
meta: {
|
|
19
|
+
total: number;
|
|
20
|
+
limit: any;
|
|
21
|
+
offset: any;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
saveConfiguration(configData: any): Promise<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
message: string;
|
|
27
|
+
data: any;
|
|
28
|
+
}>;
|
|
29
|
+
getConfigStatus(): Promise<{
|
|
30
|
+
stripe: boolean;
|
|
31
|
+
paypal: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
product: ({ strapi, }: {
|
|
35
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
36
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
37
|
+
subscription: ({ strapi, }: {
|
|
38
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
39
|
+
}) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
initializePayment(amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
3
|
+
processWebhook(payload: any, signature: any): Promise<any>;
|
|
4
|
+
refundPayment(transactionId: any, amount: any, options: any): Promise<any>;
|
|
5
|
+
getPaymentDetails(transactionId: any): Promise<any>;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
3
|
+
processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
|
|
4
|
+
refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
|
|
5
|
+
getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
|
|
6
|
+
getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
|
|
7
|
+
data: {
|
|
8
|
+
id: string;
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: string;
|
|
11
|
+
status: string;
|
|
12
|
+
date: string;
|
|
13
|
+
customer: string;
|
|
14
|
+
paymentMethod: string;
|
|
15
|
+
gateway: any;
|
|
16
|
+
}[];
|
|
17
|
+
meta: {
|
|
18
|
+
total: number;
|
|
19
|
+
limit: any;
|
|
20
|
+
offset: any;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
saveConfiguration(configData: any): Promise<{
|
|
24
|
+
success: boolean;
|
|
25
|
+
message: string;
|
|
26
|
+
data: any;
|
|
27
|
+
}>;
|
|
28
|
+
getConfigStatus(): Promise<{
|
|
29
|
+
stripe: boolean;
|
|
30
|
+
paypal: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|