zova-module-a-pay 5.0.8 → 5.0.10
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/dist/.metadata/index.d.ts +10 -51
- package/dist/.metadata/index.d.ts.map +1 -1
- package/dist/.metadata/this.d.ts +1 -1
- package/dist/api/openapi/index.d.ts +3 -3
- package/dist/api/openapi/schemas.d.ts +1 -1
- package/dist/api/payPaymentSession.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +23 -104
- package/dist/index.js.map +1 -1
- package/dist/service/paymentCoordinator.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/payment.d.ts +12 -0
- package/dist/types/payment.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/.metadata/index.ts +10 -52
- package/src/.metadata/this.ts +1 -1
- package/src/api/openapi/index.ts +3 -3
- package/src/api/openapi/schemas.ts +1 -1
- package/src/api/payPaymentSession.ts +2 -2
- package/src/apiSchema/payPaymentSession.ts +1 -1
- package/src/index.ts +3 -3
- package/src/service/paymentCoordinator.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/payment.ts +13 -0
- package/dist/.metadata/component/paymentNextAction.d.ts +0 -26
- package/dist/.metadata/component/paymentNextAction.d.ts.map +0 -1
- package/dist/component/paymentNextAction/controller.d.ts +0 -22
- package/dist/component/paymentNextAction/controller.d.ts.map +0 -1
- package/src/.metadata/component/paymentNextAction.ts +0 -31
- package/src/component/paymentNextAction/controller.tsx +0 -92
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** model: begin */
|
|
2
|
-
export * from '../model/paymentSession.
|
|
3
|
-
import { IModelOptionsPaymentSession } from '../model/paymentSession.
|
|
2
|
+
export * from '../model/paymentSession.ts';
|
|
3
|
+
import { IModelOptionsPaymentSession } from '../model/paymentSession.ts';
|
|
4
4
|
import 'zova-module-a-model';
|
|
5
5
|
declare module 'zova-module-a-model' {
|
|
6
6
|
interface IModelRecord {
|
|
@@ -18,7 +18,7 @@ declare module 'zova-module-a-pay' {
|
|
|
18
18
|
}
|
|
19
19
|
/** model: end */
|
|
20
20
|
/** model: begin */
|
|
21
|
-
import { ModelPaymentSession } from '../model/paymentSession.
|
|
21
|
+
import type { ModelPaymentSession } from '../model/paymentSession.ts';
|
|
22
22
|
import 'zova';
|
|
23
23
|
declare module 'zova' {
|
|
24
24
|
interface IBeanRecordGeneral {
|
|
@@ -27,7 +27,7 @@ declare module 'zova' {
|
|
|
27
27
|
}
|
|
28
28
|
/** model: end */
|
|
29
29
|
/** api: begin */
|
|
30
|
-
export * from '../api/payPaymentSession.
|
|
30
|
+
export * from '../api/payPaymentSession.ts';
|
|
31
31
|
import 'zova';
|
|
32
32
|
declare module 'zova' {
|
|
33
33
|
}
|
|
@@ -41,7 +41,7 @@ declare module 'zova-module-a-pay' {
|
|
|
41
41
|
}
|
|
42
42
|
/** api: end */
|
|
43
43
|
/** api: begin */
|
|
44
|
-
import { ApiPayPaymentSession } from '../api/payPaymentSession.
|
|
44
|
+
import type { ApiPayPaymentSession } from '../api/payPaymentSession.ts';
|
|
45
45
|
export interface IModuleApi {
|
|
46
46
|
'payPaymentSession': ApiPayPaymentSession;
|
|
47
47
|
}
|
|
@@ -55,10 +55,10 @@ declare module 'zova' {
|
|
|
55
55
|
}
|
|
56
56
|
/** api: end */
|
|
57
57
|
/** openapi: begin */
|
|
58
|
-
export * from '../api/openapi/index.
|
|
58
|
+
export * from '../api/openapi/index.ts';
|
|
59
59
|
/** openapi: end */
|
|
60
60
|
/** apiSchema: begin */
|
|
61
|
-
export * from '../apiSchema/payPaymentSession.
|
|
61
|
+
export * from '../apiSchema/payPaymentSession.ts';
|
|
62
62
|
import 'zova';
|
|
63
63
|
declare module 'zova' {
|
|
64
64
|
}
|
|
@@ -72,7 +72,7 @@ declare module 'zova-module-a-pay' {
|
|
|
72
72
|
}
|
|
73
73
|
/** apiSchema: end */
|
|
74
74
|
/** apiSchema: begin */
|
|
75
|
-
import { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.
|
|
75
|
+
import type { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.ts';
|
|
76
76
|
export interface IModuleApiSchema {
|
|
77
77
|
'payPaymentSession': ApiSchemaPayPaymentSession;
|
|
78
78
|
}
|
|
@@ -86,7 +86,7 @@ declare module 'zova' {
|
|
|
86
86
|
}
|
|
87
87
|
/** apiSchema: end */
|
|
88
88
|
/** service: begin */
|
|
89
|
-
export * from '../service/paymentCoordinator.
|
|
89
|
+
export * from '../service/paymentCoordinator.ts';
|
|
90
90
|
import 'zova-module-a-bean';
|
|
91
91
|
declare module 'zova-module-a-bean' {
|
|
92
92
|
interface IServiceRecord {
|
|
@@ -103,7 +103,7 @@ declare module 'zova-module-a-pay' {
|
|
|
103
103
|
}
|
|
104
104
|
/** service: end */
|
|
105
105
|
/** service: begin */
|
|
106
|
-
import { ServicePaymentCoordinator } from '../service/paymentCoordinator.
|
|
106
|
+
import type { ServicePaymentCoordinator } from '../service/paymentCoordinator.ts';
|
|
107
107
|
import 'zova';
|
|
108
108
|
declare module 'zova' {
|
|
109
109
|
interface IBeanRecordGeneral {
|
|
@@ -111,47 +111,6 @@ declare module 'zova' {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
/** service: end */
|
|
114
|
-
/** controller: begin */
|
|
115
|
-
export * from '../component/paymentNextAction/controller.jsx';
|
|
116
|
-
import 'zova';
|
|
117
|
-
declare module 'zova' {
|
|
118
|
-
}
|
|
119
|
-
declare module 'zova-module-a-pay' {
|
|
120
|
-
interface ControllerPaymentNextAction {
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/** controller: end */
|
|
124
|
-
/** controller: begin */
|
|
125
|
-
import { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';
|
|
126
|
-
import 'zova';
|
|
127
|
-
declare module 'zova' {
|
|
128
|
-
interface IBeanRecordLocal {
|
|
129
|
-
'a-pay.controller.paymentNextAction': ControllerPaymentNextAction;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/** controller: end */
|
|
133
|
-
/** components: begin */
|
|
134
|
-
export * from './component/paymentNextAction.js';
|
|
135
|
-
import { ZPaymentNextAction } from './component/paymentNextAction.js';
|
|
136
|
-
export declare const components: {
|
|
137
|
-
paymentNextAction: import("vue").DefineSetupFnComponent<import("zova-module-a-pay").ZPaymentNextActionProps, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, {
|
|
138
|
-
controllerRef?: (ref: ControllerPaymentNextAction) => void;
|
|
139
|
-
} & import("zova-module-a-pay").ControllerPaymentNextActionProps & ({
|
|
140
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
141
|
-
} | {
|
|
142
|
-
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
143
|
-
}), import("vue").PublicProps>;
|
|
144
|
-
};
|
|
145
|
-
import 'zova';
|
|
146
|
-
declare module 'zova' {
|
|
147
|
-
interface IComponentRecord {
|
|
148
|
-
'a-pay:paymentNextAction': ControllerPaymentNextAction;
|
|
149
|
-
}
|
|
150
|
-
interface IZovaComponentRecord {
|
|
151
|
-
'a-pay:paymentNextAction': typeof ZPaymentNextAction;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
/** components: end */
|
|
155
114
|
/** scope: begin */
|
|
156
115
|
import { BeanScopeBase, type BeanScopeUtil } from 'zova';
|
|
157
116
|
export declare class ScopeModuleAPay extends BeanScopeBase {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,mBAAmB;AACnB,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,qBAAqB,CAAC;IAEjC,UAAiB,YAAY;QAC3B,sBAAsB,EAAE,2BAA2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,mBAAmB,CAAC;IAE3B,UAAiB,yBAAyB;KAGzC;IAED,UAAiB,yBAAyB;QACxC,IAAI,aAAa,IAAI,kCAAkC,CAAC;QACxD,IAAI,UAAU,IAAI,0BAA0B,CAAC;KAE9C;CACR;AACD,mBAAmB;AACnB,qBAAqB;AACrB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,kBAAkB;QACjC,kCAAkC,EAAE,yBAAyB,CAAC;KAC/D;CACF;AACD,mBAAmB;AACnB,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAGzD,qBACa,eAAgB,SAAQ,aAAa;CAAG;AAErD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACtB,GAAG,EAAE,UAAU,CAAC;IAChB,SAAS,EAAE,gBAAgB,CAAC;CAC3B;AAED,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,gBAAgB;QAC/B,OAAO,EAAE,eAAe,CAAC;KAC1B;CAOF;AAED,iBAAiB"}
|
package/dist/.metadata/this.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './baseURL.
|
|
2
|
-
export * from './schemas.
|
|
3
|
-
export * from './types.
|
|
1
|
+
export * from './baseURL.ts';
|
|
2
|
+
export * from './schemas.ts';
|
|
3
|
+
export * from './types.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { components } from './types.
|
|
1
|
+
import type { components } from './types.ts';
|
|
2
2
|
export type ApiSchemaTestVonaDtoPostCreate = components['schemas']['test-vona.dto.postCreate'];
|
|
3
3
|
export type ApiSchemaTestVonaDtoPostCreatePartial = Partial<ApiSchemaTestVonaDtoPostCreate>;
|
|
4
4
|
export type ApiSchemaTestVonaDtoUserCreate = components['schemas']['test-vona.dto.userCreate'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IApiActionOptions } from 'zova-module-a-api';
|
|
2
2
|
import { BeanApiBase } from 'zova-module-a-api';
|
|
3
|
-
import type { paths } from './openapi/index.
|
|
3
|
+
import type { paths } from './openapi/index.ts';
|
|
4
4
|
/** PayPaymentSession_start */
|
|
5
5
|
export declare const ApiApiPayPaymentSessionstartPath = "/api/pay/payment-session/{id}/start";
|
|
6
6
|
export type ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './lib/index.
|
|
2
|
-
export * from './types/index.
|
|
3
|
-
export * from './.metadata/index.
|
|
1
|
+
export * from './lib/index.ts';
|
|
2
|
+
export * from './types/index.ts';
|
|
3
|
+
export * from './.metadata/index.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { BeanBase,
|
|
1
|
+
import { BeanBase, BeanInfo, BeanScopeBase } from "zova";
|
|
2
2
|
import { BeanModelBase, Model } from "zova-module-a-model";
|
|
3
3
|
import { Api, ApiSchema, BeanApiBase } from "zova-module-a-api";
|
|
4
|
-
import {
|
|
5
|
-
import { createVNode, defineComponent, isVNode } from "vue";
|
|
4
|
+
import { Scope, Service } from "zova-module-a-bean";
|
|
6
5
|
//#region src/model/paymentSession.ts
|
|
7
|
-
var _dec$
|
|
8
|
-
var _dec2$
|
|
9
|
-
var _class$
|
|
10
|
-
var ModelPaymentSession = (_dec$
|
|
6
|
+
var _dec$4;
|
|
7
|
+
var _dec2$4;
|
|
8
|
+
var _class$4;
|
|
9
|
+
var ModelPaymentSession = (_dec$4 = Model(), _dec2$4 = BeanInfo({ module: "a-pay" }), _dec$4(_class$4 = _dec2$4(_class$4 = class ModelPaymentSession extends BeanModelBase {
|
|
11
10
|
view(id) {
|
|
12
11
|
if (this.$ssr.cookieDisabledOnServer) return;
|
|
13
12
|
if (!this.$passport.isAuthenticated) return;
|
|
@@ -40,7 +39,7 @@ var ModelPaymentSession = (_dec$5 = Model(), _dec2$5 = BeanInfo({ module: "a-pay
|
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
|
-
}) || _class$
|
|
42
|
+
}) || _class$4) || _class$4);
|
|
44
43
|
//#endregion
|
|
45
44
|
//#region src/api/openapi/baseURL.ts
|
|
46
45
|
var OpenApiBaseURL = (sys) => {
|
|
@@ -48,16 +47,16 @@ var OpenApiBaseURL = (sys) => {
|
|
|
48
47
|
};
|
|
49
48
|
//#endregion
|
|
50
49
|
//#region src/api/payPaymentSession.ts
|
|
51
|
-
var _dec$
|
|
52
|
-
var _dec2$
|
|
53
|
-
var _class$
|
|
50
|
+
var _dec$3;
|
|
51
|
+
var _dec2$3;
|
|
52
|
+
var _class$3;
|
|
54
53
|
/** PayPaymentSession_start */
|
|
55
54
|
var ApiApiPayPaymentSessionstartPath = "/api/pay/payment-session/{id}/start";
|
|
56
55
|
/** PayPaymentSession_reconcile */
|
|
57
56
|
var ApiApiPayPaymentSessionreconcilePath = "/api/pay/payment-session/{id}/reconcile";
|
|
58
57
|
/** PayPaymentSession_view */
|
|
59
58
|
var ApiApiPayPaymentSessionviewPath = "/api/pay/payment-session/{id}";
|
|
60
|
-
var ApiPayPaymentSession = (_dec$
|
|
59
|
+
var ApiPayPaymentSession = (_dec$3 = Api(), _dec2$3 = BeanInfo({ module: "a-pay" }), _dec$3(_class$3 = _dec2$3(_class$3 = class ApiPayPaymentSession extends BeanApiBase {
|
|
61
60
|
start(body, options) {
|
|
62
61
|
return this.$fetch.post(this.$pathTranslate("/api/pay/payment-session/{id}/start", options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));
|
|
63
62
|
}
|
|
@@ -67,13 +66,13 @@ var ApiPayPaymentSession = (_dec$4 = Api(), _dec2$4 = BeanInfo({ module: "a-pay"
|
|
|
67
66
|
view(options) {
|
|
68
67
|
return this.$fetch.get(this.$pathTranslate("/api/pay/payment-session/{id}", options.params), this.$configPrepare(OpenApiBaseURL(this.sys), options, true));
|
|
69
68
|
}
|
|
70
|
-
}) || _class$
|
|
69
|
+
}) || _class$3) || _class$3);
|
|
71
70
|
//#endregion
|
|
72
71
|
//#region src/apiSchema/payPaymentSession.ts
|
|
73
|
-
var _dec$
|
|
74
|
-
var _dec2$
|
|
75
|
-
var _class$
|
|
76
|
-
var ApiSchemaPayPaymentSession = (_dec$
|
|
72
|
+
var _dec$2;
|
|
73
|
+
var _dec2$2;
|
|
74
|
+
var _class$2;
|
|
75
|
+
var ApiSchemaPayPaymentSession = (_dec$2 = ApiSchema(), _dec2$2 = BeanInfo({ module: "a-pay" }), _dec$2(_class$2 = _dec2$2(_class$2 = class ApiSchemaPayPaymentSession extends BeanBase {
|
|
77
76
|
start(options) {
|
|
78
77
|
return this.$sdk.createApiSchemas("/api/pay/payment-session/{id}/start", "post", options);
|
|
79
78
|
}
|
|
@@ -83,107 +82,27 @@ var ApiSchemaPayPaymentSession = (_dec$3 = ApiSchema(), _dec2$3 = BeanInfo({ mod
|
|
|
83
82
|
view(options) {
|
|
84
83
|
return this.$sdk.createApiSchemas("/api/pay/payment-session/{id}", "get", options);
|
|
85
84
|
}
|
|
86
|
-
}) || _class$
|
|
85
|
+
}) || _class$2) || _class$2);
|
|
87
86
|
//#endregion
|
|
88
87
|
//#region src/service/paymentCoordinator.ts
|
|
89
|
-
var _dec$
|
|
90
|
-
var _dec2$
|
|
91
|
-
var _class$
|
|
92
|
-
var ServicePaymentCoordinator = (_dec$
|
|
88
|
+
var _dec$1;
|
|
89
|
+
var _dec2$1;
|
|
90
|
+
var _class$1;
|
|
91
|
+
var ServicePaymentCoordinator = (_dec$1 = Service(), _dec2$1 = BeanInfo({ module: "a-pay" }), _dec$1(_class$1 = _dec2$1(_class$1 = class ServicePaymentCoordinator extends BeanBase {
|
|
93
92
|
async execute(action) {
|
|
94
93
|
if (action.kind !== "redirect") return;
|
|
95
94
|
if (!process.env.CLIENT) return;
|
|
96
95
|
window.location.assign(action.url);
|
|
97
96
|
}
|
|
98
|
-
}) || _class$
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/component/paymentNextAction/controller.tsx
|
|
101
|
-
var _dec$1;
|
|
102
|
-
var _dec2$1;
|
|
103
|
-
var _dec3;
|
|
104
|
-
var _dec4;
|
|
105
|
-
var _class$1;
|
|
106
|
-
var _class2;
|
|
107
|
-
var _descriptor;
|
|
108
|
-
var _ControllerPaymentNextAction;
|
|
109
|
-
function _initializerDefineProperty(e, i, r, l) {
|
|
110
|
-
r && Object.defineProperty(e, i, {
|
|
111
|
-
enumerable: r.enumerable,
|
|
112
|
-
configurable: r.configurable,
|
|
113
|
-
writable: r.writable,
|
|
114
|
-
value: r.initializer ? r.initializer.call(l) : void 0
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
118
|
-
var a = {};
|
|
119
|
-
return Object.keys(n).forEach(function(i) {
|
|
120
|
-
a[i] = n[i];
|
|
121
|
-
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function(r, n) {
|
|
122
|
-
return n(i, e, r) || r;
|
|
123
|
-
}, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
|
|
124
|
-
}
|
|
125
|
-
var ZButton = createZovaComponentAsync("basic-button", "button");
|
|
126
|
-
function _isSlot(s) {
|
|
127
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
128
|
-
}
|
|
129
|
-
var ControllerPaymentNextAction = (_dec$1 = Controller(), _dec2$1 = BeanInfo({ module: "a-pay" }), _dec3 = Use(), _dec4 = Reflect.metadata("design:type", typeof ServicePaymentCoordinator === "undefined" ? Object : ServicePaymentCoordinator), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = (_ControllerPaymentNextAction = class ControllerPaymentNextAction extends BeanControllerBase {
|
|
130
|
-
constructor(...args) {
|
|
131
|
-
super(...args);
|
|
132
|
-
_initializerDefineProperty(this, "$$paymentCoordinator", _descriptor, this);
|
|
133
|
-
}
|
|
134
|
-
async continueRedirect() {
|
|
135
|
-
const action = this.$props.action;
|
|
136
|
-
if (action?.kind !== "redirect" || this.$props.disabled) return;
|
|
137
|
-
await this.$$paymentCoordinator.execute(action);
|
|
138
|
-
}
|
|
139
|
-
render() {
|
|
140
|
-
const { action, disabled, continueToPaymentText, continueToPaymentHelpText, embeddedCheckoutUnavailableText, paymentCompletedText, paymentPreparingText, paymentPreparingRetryText, refreshPaymentStatusText, onRefresh } = this.$props;
|
|
141
|
-
if (!action) return null;
|
|
142
|
-
if (action.kind === "redirect") return createVNode("div", { "class": "mt-6 space-y-3" }, [createVNode("p", { "class": "text-base-content/70" }, [continueToPaymentHelpText]), createVNode(ZButton, {
|
|
143
|
-
"class": "btn btn-primary",
|
|
144
|
-
"disabled": disabled,
|
|
145
|
-
"onPerform": () => this.continueRedirect()
|
|
146
|
-
}, _isSlot(continueToPaymentText) ? continueToPaymentText : { default: () => [continueToPaymentText] })]);
|
|
147
|
-
if (action.kind === "pending") return createVNode("div", {
|
|
148
|
-
"class": "mt-6 space-y-3",
|
|
149
|
-
"aria-live": "polite"
|
|
150
|
-
}, [createVNode("p", { "class": "text-base-content/70" }, [action.retryAfterSeconds ? paymentPreparingRetryText?.(action.retryAfterSeconds) : paymentPreparingText]), onRefresh && createVNode(ZButton, {
|
|
151
|
-
"class": "btn btn-outline",
|
|
152
|
-
"disabled": disabled,
|
|
153
|
-
"onPerform": () => onRefresh()
|
|
154
|
-
}, _isSlot(refreshPaymentStatusText) ? refreshPaymentStatusText : { default: () => [refreshPaymentStatusText] })]);
|
|
155
|
-
if (action.kind === "completed") return createVNode("p", {
|
|
156
|
-
"class": "mt-6 text-base-content/70",
|
|
157
|
-
"aria-live": "polite"
|
|
158
|
-
}, [paymentCompletedText]);
|
|
159
|
-
return createVNode("div", {
|
|
160
|
-
"class": "mt-6",
|
|
161
|
-
"aria-live": "polite"
|
|
162
|
-
}, [createVNode("p", { "class": "text-base-content/70" }, [embeddedCheckoutUnavailableText])]);
|
|
163
|
-
}
|
|
164
|
-
}, _ControllerPaymentNextAction.$propsDefault = {}, _ControllerPaymentNextAction), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "$$paymentCoordinator", [_dec3, _dec4], {
|
|
165
|
-
configurable: true,
|
|
166
|
-
enumerable: true,
|
|
167
|
-
writable: true,
|
|
168
|
-
initializer: null
|
|
169
|
-
}), _class2)) || _class$1) || _class$1);
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/.metadata/component/paymentNextAction.ts
|
|
172
|
-
var ZPaymentNextAction = defineComponent((_props) => {
|
|
173
|
-
useController(ControllerPaymentNextAction, void 0, void 0);
|
|
174
|
-
return () => {};
|
|
175
|
-
}, prepareComponentOptions());
|
|
97
|
+
}) || _class$1) || _class$1);
|
|
176
98
|
//#endregion
|
|
177
99
|
//#region src/.metadata/index.ts
|
|
178
|
-
/** components: end */
|
|
179
|
-
/** scope: begin */
|
|
180
100
|
var _dec;
|
|
181
101
|
var _dec2;
|
|
182
102
|
var _class;
|
|
183
|
-
var components = { "paymentNextAction": ZPaymentNextAction };
|
|
184
103
|
var ScopeModuleAPay = (_dec = Scope(), _dec2 = BeanInfo({ module: "a-pay" }), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);
|
|
185
104
|
/** scope: end */
|
|
186
105
|
//#endregion
|
|
187
|
-
export { ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionviewPath, ApiPayPaymentSession, ApiSchemaPayPaymentSession,
|
|
106
|
+
export { ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionviewPath, ApiPayPaymentSession, ApiSchemaPayPaymentSession, ModelPaymentSession, OpenApiBaseURL, ScopeModuleAPay, ServicePaymentCoordinator };
|
|
188
107
|
|
|
189
108
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BeanControllerBase","Use","Controller","ServicePaymentCoordinator","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPaymentNextAction","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","_class","_class2","_ControllerPaymentNextAction","constructor","args","_initializerDefineProperty","_descriptor","continueRedirect","action","$props","kind","disabled","$$paymentCoordinator","execute","render","continueToPaymentText","continueToPaymentHelpText","embeddedCheckoutUnavailableText","paymentCompletedText","paymentPreparingText","paymentPreparingRetryText","refreshPaymentStatusText","onRefresh","_createVNode","ZButton","onPerform","default","retryAfterSeconds","$propsDefault","_applyDecoratedDescriptor","configurable","enumerable","writable","initializer"],"sources":["../src/model/paymentSession.ts","../src/api/openapi/baseURL.ts","../src/api/payPaymentSession.ts","../src/apiSchema/payPaymentSession.ts","../src/service/paymentCoordinator.ts","../src/component/paymentNextAction/controller.tsx","../src/.metadata/component/paymentNextAction.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelPaymentSession = (_dec = Model(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ModelPaymentSession extends BeanModelBase {\n view(id) {\n if (this.$ssr.cookieDisabledOnServer) return;\n if (!this.$passport.isAuthenticated) return;\n return this.$useStateData({\n queryKey: ['view', id],\n queryFn: async () => {\n return await this.scope.api.payPaymentSession.view({\n params: {\n id\n }\n });\n }\n });\n }\n reconcile(id) {\n return this.$useMutationData({\n mutationKey: ['reconcile', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.reconcile(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n start(id) {\n return this.$useMutationData({\n mutationKey: ['start', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.start(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n}) || _class) || _class);","export const OpenApiBaseURL = sys => {\n return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_A_PAY');\n};","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { Api, BeanApiBase } from 'zova-module-a-api';\nimport { OpenApiBaseURL } from './openapi/index.js';\n\n/** PayPaymentSession_start */\nexport const ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PayPaymentSession_reconcile */\nexport const ApiApiPayPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PayPaymentSession_view */\nexport const ApiApiPayPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPayPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPayPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPayPaymentSessionviewPath, options.params), this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { ApiSchema } from 'zova-module-a-api';\nimport { ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionviewPath } from '../api/payPaymentSession.js';\nexport let ApiSchemaPayPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPayPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionviewPath, 'get', options);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { Service } from 'zova-module-a-bean';\nexport let ServicePaymentCoordinator = (_dec = Service(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ServicePaymentCoordinator extends BeanBase {\n async execute(action) {\n if (action.kind !== 'redirect') return;\n if (!process.env.CLIENT) return;\n window.location.assign(action.url);\n }\n}) || _class) || _class);","import { BeanControllerBase, Use } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\nimport { ZButton } from 'zova-module-basic-button';\n\nimport type { TypePaymentNextAction } from '../../types/payment.js';\n\nimport { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';\n\nexport interface ControllerPaymentNextActionProps {\n action?: TypePaymentNextAction;\n disabled?: boolean;\n continueToPaymentText?: string;\n continueToPaymentHelpText?: string;\n embeddedCheckoutUnavailableText?: string;\n paymentCompletedText?: string;\n paymentPreparingText?: string;\n paymentPreparingRetryText?: (retryAfterSeconds: number) => string;\n refreshPaymentStatusText?: string;\n onRefresh?: () => void | Promise<void>;\n}\n\n@Controller()\nexport class ControllerPaymentNextAction extends BeanControllerBase {\n static $propsDefault = {};\n\n @Use()\n $$paymentCoordinator: ServicePaymentCoordinator;\n\n async continueRedirect() {\n const action = this.$props.action;\n if (action?.kind !== 'redirect' || this.$props.disabled) return;\n await this.$$paymentCoordinator.execute(action);\n }\n\n protected render() {\n const {\n action,\n disabled,\n continueToPaymentText,\n continueToPaymentHelpText,\n embeddedCheckoutUnavailableText,\n paymentCompletedText,\n paymentPreparingText,\n paymentPreparingRetryText,\n refreshPaymentStatusText,\n onRefresh,\n } = this.$props as ControllerPaymentNextActionProps;\n if (!action) return null;\n if (action.kind === 'redirect') {\n return (\n <div class=\"mt-6 space-y-3\">\n <p class=\"text-base-content/70\">{continueToPaymentHelpText}</p>\n <ZButton\n class=\"btn btn-primary\"\n disabled={disabled}\n onPerform={() => this.continueRedirect()}\n >\n {continueToPaymentText}\n </ZButton>\n </div>\n );\n }\n if (action.kind === 'pending') {\n return (\n <div class=\"mt-6 space-y-3\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">\n {action.retryAfterSeconds\n ? paymentPreparingRetryText?.(action.retryAfterSeconds)\n : paymentPreparingText}\n </p>\n {onRefresh && (\n <ZButton class=\"btn btn-outline\" disabled={disabled} onPerform={() => onRefresh()}>\n {refreshPaymentStatusText}\n </ZButton>\n )}\n </div>\n );\n }\n if (action.kind === 'completed') {\n return (\n <p class=\"mt-6 text-base-content/70\" aria-live=\"polite\">\n {paymentCompletedText}\n </p>\n );\n }\n return (\n <div class=\"mt-6\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">{embeddedCheckoutUnavailableText}</p>\n </div>\n );\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerPaymentNextAction } from '../../component/paymentNextAction/controller.jsx';\nexport const ZPaymentNextAction = defineComponent(_props => {\n useController(ControllerPaymentNextAction, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/paymentSession.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\nimport { ModelPaymentSession } from '../model/paymentSession.js';\nimport 'zova';\n/** model: end */\n/** api: begin */\nexport * from '../api/payPaymentSession.js';\nimport 'zova';\n/** api: end */\n/** api: begin */\nimport { ApiPayPaymentSession } from '../api/payPaymentSession.js';\n/** api: end */\n/** api: begin */\n\nimport 'zova';\n/** api: end */\n/** openapi: begin */\nexport * from '../api/openapi/index.js';\n/** openapi: end */\n/** apiSchema: begin */\nexport * from '../apiSchema/payPaymentSession.js';\nimport 'zova';\n/** apiSchema: end */\n/** apiSchema: begin */\nimport { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.js';\n/** apiSchema: end */\n/** apiSchema: begin */\n\nimport 'zova';\n/** apiSchema: end */\n/** service: begin */\nexport * from '../service/paymentCoordinator.js';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\nimport { ServicePaymentCoordinator } from '../service/paymentCoordinator.js';\nimport 'zova';\n/** service: end */\n/** controller: begin */\nexport * from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\nimport { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n\n/** components: begin */\nexport * from './component/paymentNextAction.js';\nimport { ZPaymentNextAction } from './component/paymentNextAction.js';\nexport const components = {\n 'paymentNextAction': ZPaymentNextAction\n};\nimport 'zova';\n/** components: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAPay = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;;AAAA,IAAI;AAAM,IAAA;AAAO,IAAA;AAGjB,IAAW,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AC,CAAC,KAAK,MAAM,KAAK"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","__z_BeanInfo"],"sources":["../src/model/paymentSession.ts","../src/api/openapi/baseURL.ts","../src/api/payPaymentSession.ts","../src/apiSchema/payPaymentSession.ts","../src/service/paymentCoordinator.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelPaymentSession = (_dec = Model(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ModelPaymentSession extends BeanModelBase {\n view(id) {\n if (this.$ssr.cookieDisabledOnServer) return;\n if (!this.$passport.isAuthenticated) return;\n return this.$useStateData({\n queryKey: ['view', id],\n queryFn: async () => {\n return await this.scope.api.payPaymentSession.view({\n params: {\n id\n }\n });\n }\n });\n }\n reconcile(id) {\n return this.$useMutationData({\n mutationKey: ['reconcile', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.reconcile(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n start(id) {\n return this.$useMutationData({\n mutationKey: ['start', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.start(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n}) || _class) || _class);","export const OpenApiBaseURL = sys => {\n return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_A_PAY');\n};","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { Api, BeanApiBase } from 'zova-module-a-api';\nimport { OpenApiBaseURL } from './openapi/index.ts';\n\n/** PayPaymentSession_start */\nexport const ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PayPaymentSession_reconcile */\nexport const ApiApiPayPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PayPaymentSession_view */\nexport const ApiApiPayPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPayPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPayPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPayPaymentSessionviewPath, options.params), this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { ApiSchema } from 'zova-module-a-api';\nimport { ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionviewPath } from '../api/payPaymentSession.ts';\nexport let ApiSchemaPayPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPayPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionviewPath, 'get', options);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { Service } from 'zova-module-a-bean';\nexport let ServicePaymentCoordinator = (_dec = Service(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ServicePaymentCoordinator extends BeanBase {\n async execute(action) {\n if (action.kind !== 'redirect') return;\n if (!process.env.CLIENT) return;\n window.location.assign(action.url);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/paymentSession.ts';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\n\nimport 'zova';\n/** model: end */\n/** api: begin */\nexport * from '../api/payPaymentSession.ts';\nimport 'zova';\n\n/** api: end */\n/** api: begin */\n\n/** api: end */\n/** api: begin */\n\nimport 'zova';\n/** api: end */\n/** openapi: begin */\nexport * from '../api/openapi/index.ts';\n/** openapi: end */\n/** apiSchema: begin */\nexport * from '../apiSchema/payPaymentSession.ts';\nimport 'zova';\n\n/** apiSchema: end */\n/** apiSchema: begin */\n\n/** apiSchema: end */\n/** apiSchema: begin */\n\nimport 'zova';\n/** apiSchema: end */\n/** service: begin */\nexport * from '../service/paymentCoordinator.ts';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\n\nimport 'zova';\n/** service: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAPay = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;AAAA,IAAIA;AAAMC,IAAAA;AAAOC,IAAAA;AAGjB,IAAW,uBAAuB,SAAO,MAAM,GAAG,UAAQC,SAAa,EACrE,QAAQ,QACV,CAAC,GAAGH,OAAK,WAASC,QAAM,WAAS,MAAM,4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AO,OAAO,GAAG;CACnC;AACF,CAAC,KAAKC,QAAM,KAAKA;;;ACZjB,IAAI;AAAM,IAAA;AAAO,IAAA;AAiDjB,IAAW,mBAAmB,OAAO,MAAM,GAAG,QAAQE,SAAa,EACjE,QAAQ,QACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,wBAAwB,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BeanBase } from 'zova';
|
|
2
|
-
import type { TypePaymentNextAction } from '../types/payment.
|
|
2
|
+
import type { TypePaymentNextAction } from '../types/payment.ts';
|
|
3
3
|
export declare class ServicePaymentCoordinator extends BeanBase {
|
|
4
4
|
execute(action: TypePaymentNextAction): Promise<void>;
|
|
5
5
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './payment.
|
|
1
|
+
export * from './payment.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/payment.d.ts
CHANGED
|
@@ -17,6 +17,18 @@ export interface IPaymentSessionView {
|
|
|
17
17
|
providerName: string;
|
|
18
18
|
nextAction?: TypePaymentNextAction;
|
|
19
19
|
}
|
|
20
|
+
export interface IPaymentNextActionProps {
|
|
21
|
+
action?: TypePaymentNextAction;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
continueToPaymentText?: string;
|
|
24
|
+
continueToPaymentHelpText?: string;
|
|
25
|
+
embeddedCheckoutUnavailableText?: string;
|
|
26
|
+
paymentCompletedText?: string;
|
|
27
|
+
paymentPreparingText?: string;
|
|
28
|
+
paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
|
|
29
|
+
refreshPaymentStatusText?: string;
|
|
30
|
+
onRefresh?: () => void | Promise<void>;
|
|
31
|
+
}
|
|
20
32
|
export interface IPayUiProvider {
|
|
21
33
|
supports(action: TypePaymentNextAction): boolean;
|
|
22
34
|
execute(action: TypePaymentNextAction): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/types/payment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAE1B,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EACD,SAAS,GACT,UAAU,GACV,iBAAiB,GACjB,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC;IACjD,OAAO,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD"}
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/types/payment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,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|
|
31
31
|
},
|
|
32
32
|
"dependencies": {},
|
|
33
33
|
"title": "a-pay",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "c27fb3b5f3566b676b7d635e2e26545c6d389ad7"
|
|
35
35
|
}
|
package/src/.metadata/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
2
|
/** model: begin */
|
|
3
|
-
export * from '../model/paymentSession.
|
|
4
|
-
import { IModelOptionsPaymentSession } from '../model/paymentSession.
|
|
3
|
+
export * from '../model/paymentSession.ts';
|
|
4
|
+
import { IModelOptionsPaymentSession } from '../model/paymentSession.ts';
|
|
5
5
|
import 'zova-module-a-model';
|
|
6
6
|
declare module 'zova-module-a-model' {
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ declare module 'zova-module-a-pay' {
|
|
|
26
26
|
}
|
|
27
27
|
/** model: end */
|
|
28
28
|
/** model: begin */
|
|
29
|
-
import { ModelPaymentSession } from '../model/paymentSession.
|
|
29
|
+
import type { ModelPaymentSession } from '../model/paymentSession.ts';
|
|
30
30
|
import 'zova';
|
|
31
31
|
declare module 'zova' {
|
|
32
32
|
export interface IBeanRecordGeneral {
|
|
@@ -35,7 +35,7 @@ declare module 'zova' {
|
|
|
35
35
|
}
|
|
36
36
|
/** model: end */
|
|
37
37
|
/** api: begin */
|
|
38
|
-
export * from '../api/payPaymentSession.
|
|
38
|
+
export * from '../api/payPaymentSession.ts';
|
|
39
39
|
|
|
40
40
|
import 'zova';
|
|
41
41
|
declare module 'zova' {
|
|
@@ -57,7 +57,7 @@ declare module 'zova-module-a-pay' {
|
|
|
57
57
|
}
|
|
58
58
|
/** api: end */
|
|
59
59
|
/** api: begin */
|
|
60
|
-
import { ApiPayPaymentSession } from '../api/payPaymentSession.
|
|
60
|
+
import type { ApiPayPaymentSession } from '../api/payPaymentSession.ts';
|
|
61
61
|
export interface IModuleApi {
|
|
62
62
|
'payPaymentSession': ApiPayPaymentSession;
|
|
63
63
|
}
|
|
@@ -72,10 +72,10 @@ declare module 'zova' {
|
|
|
72
72
|
}
|
|
73
73
|
/** api: end */
|
|
74
74
|
/** openapi: begin */
|
|
75
|
-
export * from '../api/openapi/index.
|
|
75
|
+
export * from '../api/openapi/index.ts';
|
|
76
76
|
/** openapi: end */
|
|
77
77
|
/** apiSchema: begin */
|
|
78
|
-
export * from '../apiSchema/payPaymentSession.
|
|
78
|
+
export * from '../apiSchema/payPaymentSession.ts';
|
|
79
79
|
|
|
80
80
|
import 'zova';
|
|
81
81
|
declare module 'zova' {
|
|
@@ -97,7 +97,7 @@ declare module 'zova-module-a-pay' {
|
|
|
97
97
|
}
|
|
98
98
|
/** apiSchema: end */
|
|
99
99
|
/** apiSchema: begin */
|
|
100
|
-
import { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.
|
|
100
|
+
import type { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.ts';
|
|
101
101
|
export interface IModuleApiSchema {
|
|
102
102
|
'payPaymentSession': ApiSchemaPayPaymentSession;
|
|
103
103
|
}
|
|
@@ -112,7 +112,7 @@ declare module 'zova' {
|
|
|
112
112
|
}
|
|
113
113
|
/** apiSchema: end */
|
|
114
114
|
/** service: begin */
|
|
115
|
-
export * from '../service/paymentCoordinator.
|
|
115
|
+
export * from '../service/paymentCoordinator.ts';
|
|
116
116
|
|
|
117
117
|
import 'zova-module-a-bean';
|
|
118
118
|
declare module 'zova-module-a-bean' {
|
|
@@ -138,7 +138,7 @@ declare module 'zova-module-a-pay' {
|
|
|
138
138
|
}
|
|
139
139
|
/** service: end */
|
|
140
140
|
/** service: begin */
|
|
141
|
-
import { ServicePaymentCoordinator } from '../service/paymentCoordinator.
|
|
141
|
+
import type { ServicePaymentCoordinator } from '../service/paymentCoordinator.ts';
|
|
142
142
|
import 'zova';
|
|
143
143
|
declare module 'zova' {
|
|
144
144
|
export interface IBeanRecordGeneral {
|
|
@@ -146,48 +146,6 @@ declare module 'zova' {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
/** service: end */
|
|
149
|
-
/** controller: begin */
|
|
150
|
-
export * from '../component/paymentNextAction/controller.jsx';
|
|
151
|
-
|
|
152
|
-
import 'zova';
|
|
153
|
-
declare module 'zova' {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
declare module 'zova-module-a-pay' {
|
|
158
|
-
|
|
159
|
-
export interface ControllerPaymentNextAction {
|
|
160
|
-
/** @internal */
|
|
161
|
-
get scope(): ScopeModuleAPay;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
/** controller: end */
|
|
165
|
-
/** controller: begin */
|
|
166
|
-
import { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';
|
|
167
|
-
import 'zova';
|
|
168
|
-
declare module 'zova' {
|
|
169
|
-
export interface IBeanRecordLocal {
|
|
170
|
-
'a-pay.controller.paymentNextAction': ControllerPaymentNextAction;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/** controller: end */
|
|
174
|
-
|
|
175
|
-
/** components: begin */
|
|
176
|
-
export * from './component/paymentNextAction.js';
|
|
177
|
-
import { ZPaymentNextAction } from './component/paymentNextAction.js';
|
|
178
|
-
export const components = {
|
|
179
|
-
'paymentNextAction': ZPaymentNextAction,
|
|
180
|
-
};
|
|
181
|
-
import 'zova';
|
|
182
|
-
declare module 'zova' {
|
|
183
|
-
export interface IComponentRecord {
|
|
184
|
-
'a-pay:paymentNextAction': ControllerPaymentNextAction;
|
|
185
|
-
}
|
|
186
|
-
export interface IZovaComponentRecord {
|
|
187
|
-
'a-pay:paymentNextAction': typeof ZPaymentNextAction;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
/** components: end */
|
|
191
149
|
/** scope: begin */
|
|
192
150
|
import { BeanScopeBase, type BeanScopeUtil } from 'zova';
|
|
193
151
|
import { Scope } from 'zova-module-a-bean';
|
package/src/.metadata/this.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const __ThisModule__ = 'a-pay';
|
|
2
|
-
export { ScopeModuleAPay as ScopeModule } from './index.
|
|
2
|
+
export { ScopeModuleAPay as ScopeModule } from './index.ts';
|
package/src/api/openapi/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './baseURL.
|
|
2
|
-
export * from './schemas.
|
|
3
|
-
export * from './types.
|
|
1
|
+
export * from './baseURL.ts';
|
|
2
|
+
export * from './schemas.ts';
|
|
3
|
+
export * from './types.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
|
-
import type { components } from './types.
|
|
2
|
+
import type { components } from './types.ts';
|
|
3
3
|
export type ApiSchemaTestVonaDtoPostCreate = components['schemas']['test-vona.dto.postCreate'];
|
|
4
4
|
export type ApiSchemaTestVonaDtoPostCreatePartial = Partial<ApiSchemaTestVonaDtoPostCreate>;
|
|
5
5
|
export type ApiSchemaTestVonaDtoUserCreate = components['schemas']['test-vona.dto.userCreate'];
|
|
@@ -2,9 +2,9 @@ import type { IApiActionOptions } from 'zova-module-a-api';
|
|
|
2
2
|
|
|
3
3
|
import { Api, BeanApiBase } from 'zova-module-a-api';
|
|
4
4
|
|
|
5
|
-
import type { paths } from './openapi/index.
|
|
5
|
+
import type { paths } from './openapi/index.ts';
|
|
6
6
|
|
|
7
|
-
import { OpenApiBaseURL } from './openapi/index.
|
|
7
|
+
import { OpenApiBaseURL } from './openapi/index.ts';
|
|
8
8
|
|
|
9
9
|
/** PayPaymentSession_start */
|
|
10
10
|
export const ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ApiApiPayPaymentSessionstartPath,
|
|
8
8
|
ApiApiPayPaymentSessionreconcilePath,
|
|
9
9
|
ApiApiPayPaymentSessionviewPath,
|
|
10
|
-
} from '../api/payPaymentSession.
|
|
10
|
+
} from '../api/payPaymentSession.ts';
|
|
11
11
|
|
|
12
12
|
@ApiSchema()
|
|
13
13
|
export class ApiSchemaPayPaymentSession extends BeanBase {
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './lib/index.
|
|
2
|
-
export * from './types/index.
|
|
3
|
-
export * from './.metadata/index.
|
|
1
|
+
export * from './lib/index.ts';
|
|
2
|
+
export * from './types/index.ts';
|
|
3
|
+
export * from './.metadata/index.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BeanBase } from 'zova';
|
|
2
2
|
import { Service } from 'zova-module-a-bean';
|
|
3
3
|
|
|
4
|
-
import type { TypePaymentNextAction } from '../types/payment.
|
|
4
|
+
import type { TypePaymentNextAction } from '../types/payment.ts';
|
|
5
5
|
|
|
6
6
|
@Service()
|
|
7
7
|
export class ServicePaymentCoordinator extends BeanBase {
|
package/src/types/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './payment.
|
|
1
|
+
export * from './payment.ts';
|
package/src/types/payment.ts
CHANGED
|
@@ -19,6 +19,19 @@ export interface IPaymentSessionView {
|
|
|
19
19
|
nextAction?: TypePaymentNextAction;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export interface IPaymentNextActionProps {
|
|
23
|
+
action?: TypePaymentNextAction;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
continueToPaymentText?: string;
|
|
26
|
+
continueToPaymentHelpText?: string;
|
|
27
|
+
embeddedCheckoutUnavailableText?: string;
|
|
28
|
+
paymentCompletedText?: string;
|
|
29
|
+
paymentPreparingText?: string;
|
|
30
|
+
paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
|
|
31
|
+
refreshPaymentStatusText?: string;
|
|
32
|
+
onRefresh?: () => void | Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
|
|
22
35
|
export interface IPayUiProvider {
|
|
23
36
|
supports(action: TypePaymentNextAction): boolean;
|
|
24
37
|
execute(action: TypePaymentNextAction): Promise<void>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
-
import type { ControllerPaymentNextActionProps } from '../../component/paymentNextAction/controller.jsx';
|
|
3
|
-
import { ControllerPaymentNextAction } from '../../component/paymentNextAction/controller.jsx';
|
|
4
|
-
export type ZPaymentNextActionProps = {
|
|
5
|
-
controllerRef?: (ref: ControllerPaymentNextAction) => void;
|
|
6
|
-
} & ControllerPaymentNextActionProps;
|
|
7
|
-
type ControllerInnerProps = TypeControllerInnerProps<ControllerPaymentNextActionProps, keyof typeof ControllerPaymentNextAction.$propsDefault>;
|
|
8
|
-
declare module 'zova-module-a-pay' {
|
|
9
|
-
interface ControllerPaymentNextAction {
|
|
10
|
-
$props: ControllerInnerProps;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export declare const ZPaymentNextAction: import("vue").DefineSetupFnComponent<ZPaymentNextActionProps, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, {
|
|
14
|
-
controllerRef?: (ref: ControllerPaymentNextAction) => void;
|
|
15
|
-
} & ControllerPaymentNextActionProps & ({
|
|
16
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
17
|
-
} | {
|
|
18
|
-
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
19
|
-
}), import("vue").PublicProps>;
|
|
20
|
-
declare module 'zova-module-a-bean' {
|
|
21
|
-
interface IVonaComponentRecord {
|
|
22
|
-
'a-pay:paymentNextAction': ControllerPaymentNextActionProps;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=paymentNextAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paymentNextAction.d.ts","sourceRoot":"","sources":["../../../src/.metadata/component/paymentNextAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAKrD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAEzG,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,2BAA2B,KAAK,IAAI,CAAC;CAC5D,GAAG,gCAAgC,CAAC;AAErC,KAAK,oBAAoB,GAAG,wBAAwB,CAClD,gCAAgC,EAChC,MAAM,OAAO,2BAA2B,CAAC,aAAa,CACvD,CAAC;AACF,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAiB,2BAA2B;QAC1C,MAAM,EAAE,oBAAoB,CAAC;KAC9B;CACF;AAED,eAAO,MAAM,kBAAkB;oBAbb,CAAC,GAAG,EAAE,2BAA2B,KAAK,IAAI;;;;;8BAgB/B,CAAC;AAC9B,OAAO,QAAQ,oBAAoB,CAAC;IAClC,UAAiB,oBAAoB;QACnC,yBAAyB,EAAE,gCAAgC,CAAC;KAC7D;CACF"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BeanControllerBase } from 'zova';
|
|
2
|
-
import type { TypePaymentNextAction } from '../../types/payment.js';
|
|
3
|
-
import { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';
|
|
4
|
-
export interface ControllerPaymentNextActionProps {
|
|
5
|
-
action?: TypePaymentNextAction;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
continueToPaymentText?: string;
|
|
8
|
-
continueToPaymentHelpText?: string;
|
|
9
|
-
embeddedCheckoutUnavailableText?: string;
|
|
10
|
-
paymentCompletedText?: string;
|
|
11
|
-
paymentPreparingText?: string;
|
|
12
|
-
paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
|
|
13
|
-
refreshPaymentStatusText?: string;
|
|
14
|
-
onRefresh?: () => void | Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
export declare class ControllerPaymentNextAction extends BeanControllerBase {
|
|
17
|
-
static $propsDefault: {};
|
|
18
|
-
$$paymentCoordinator: ServicePaymentCoordinator;
|
|
19
|
-
continueRedirect(): Promise<void>;
|
|
20
|
-
protected render(): import("vue/jsx-runtime").JSX.Element | null;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/paymentNextAction/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAO,MAAM,MAAM,CAAC;AAI/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,MAAM,CAAC;IAClE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,qBACa,2BAA4B,SAAQ,kBAAkB;IACjE,MAAM,CAAC,aAAa,KAAM;IAG1B,oBAAoB,EAAE,yBAAyB,CAAC;IAE1C,gBAAgB;IAMtB,SAAS,CAAC,MAAM;CAyDjB"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
-
|
|
3
|
-
import { defineComponent } from 'vue';
|
|
4
|
-
import { prepareComponentOptions, useController } from 'zova';
|
|
5
|
-
|
|
6
|
-
import type { ControllerPaymentNextActionProps } from '../../component/paymentNextAction/controller.jsx';
|
|
7
|
-
|
|
8
|
-
import { ControllerPaymentNextAction } from '../../component/paymentNextAction/controller.jsx';
|
|
9
|
-
export type ZPaymentNextActionProps = {
|
|
10
|
-
controllerRef?: (ref: ControllerPaymentNextAction) => void;
|
|
11
|
-
} & ControllerPaymentNextActionProps;
|
|
12
|
-
|
|
13
|
-
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
-
ControllerPaymentNextActionProps,
|
|
15
|
-
keyof typeof ControllerPaymentNextAction.$propsDefault
|
|
16
|
-
>;
|
|
17
|
-
declare module 'zova-module-a-pay' {
|
|
18
|
-
export interface ControllerPaymentNextAction {
|
|
19
|
-
$props: ControllerInnerProps;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const ZPaymentNextAction = defineComponent((_props: ZPaymentNextActionProps) => {
|
|
24
|
-
useController(ControllerPaymentNextAction, undefined, undefined);
|
|
25
|
-
return () => {};
|
|
26
|
-
}, prepareComponentOptions());
|
|
27
|
-
declare module 'zova-module-a-bean' {
|
|
28
|
-
export interface IVonaComponentRecord {
|
|
29
|
-
'a-pay:paymentNextAction': ControllerPaymentNextActionProps;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { BeanControllerBase, Use } from 'zova';
|
|
2
|
-
import { Controller } from 'zova-module-a-bean';
|
|
3
|
-
import { ZButton } from 'zova-module-basic-button';
|
|
4
|
-
|
|
5
|
-
import type { TypePaymentNextAction } from '../../types/payment.js';
|
|
6
|
-
|
|
7
|
-
import { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';
|
|
8
|
-
|
|
9
|
-
export interface ControllerPaymentNextActionProps {
|
|
10
|
-
action?: TypePaymentNextAction;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
continueToPaymentText?: string;
|
|
13
|
-
continueToPaymentHelpText?: string;
|
|
14
|
-
embeddedCheckoutUnavailableText?: string;
|
|
15
|
-
paymentCompletedText?: string;
|
|
16
|
-
paymentPreparingText?: string;
|
|
17
|
-
paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
|
|
18
|
-
refreshPaymentStatusText?: string;
|
|
19
|
-
onRefresh?: () => void | Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Controller()
|
|
23
|
-
export class ControllerPaymentNextAction extends BeanControllerBase {
|
|
24
|
-
static $propsDefault = {};
|
|
25
|
-
|
|
26
|
-
@Use()
|
|
27
|
-
$$paymentCoordinator: ServicePaymentCoordinator;
|
|
28
|
-
|
|
29
|
-
async continueRedirect() {
|
|
30
|
-
const action = this.$props.action;
|
|
31
|
-
if (action?.kind !== 'redirect' || this.$props.disabled) return;
|
|
32
|
-
await this.$$paymentCoordinator.execute(action);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
protected render() {
|
|
36
|
-
const {
|
|
37
|
-
action,
|
|
38
|
-
disabled,
|
|
39
|
-
continueToPaymentText,
|
|
40
|
-
continueToPaymentHelpText,
|
|
41
|
-
embeddedCheckoutUnavailableText,
|
|
42
|
-
paymentCompletedText,
|
|
43
|
-
paymentPreparingText,
|
|
44
|
-
paymentPreparingRetryText,
|
|
45
|
-
refreshPaymentStatusText,
|
|
46
|
-
onRefresh,
|
|
47
|
-
} = this.$props as ControllerPaymentNextActionProps;
|
|
48
|
-
if (!action) return null;
|
|
49
|
-
if (action.kind === 'redirect') {
|
|
50
|
-
return (
|
|
51
|
-
<div class="mt-6 space-y-3">
|
|
52
|
-
<p class="text-base-content/70">{continueToPaymentHelpText}</p>
|
|
53
|
-
<ZButton
|
|
54
|
-
class="btn btn-primary"
|
|
55
|
-
disabled={disabled}
|
|
56
|
-
onPerform={() => this.continueRedirect()}
|
|
57
|
-
>
|
|
58
|
-
{continueToPaymentText}
|
|
59
|
-
</ZButton>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
if (action.kind === 'pending') {
|
|
64
|
-
return (
|
|
65
|
-
<div class="mt-6 space-y-3" aria-live="polite">
|
|
66
|
-
<p class="text-base-content/70">
|
|
67
|
-
{action.retryAfterSeconds
|
|
68
|
-
? paymentPreparingRetryText?.(action.retryAfterSeconds)
|
|
69
|
-
: paymentPreparingText}
|
|
70
|
-
</p>
|
|
71
|
-
{onRefresh && (
|
|
72
|
-
<ZButton class="btn btn-outline" disabled={disabled} onPerform={() => onRefresh()}>
|
|
73
|
-
{refreshPaymentStatusText}
|
|
74
|
-
</ZButton>
|
|
75
|
-
)}
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
if (action.kind === 'completed') {
|
|
80
|
-
return (
|
|
81
|
-
<p class="mt-6 text-base-content/70" aria-live="polite">
|
|
82
|
-
{paymentCompletedText}
|
|
83
|
-
</p>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
return (
|
|
87
|
-
<div class="mt-6" aria-live="polite">
|
|
88
|
-
<p class="text-base-content/70">{embeddedCheckoutUnavailableText}</p>
|
|
89
|
-
</div>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
}
|