cabloy 5.1.127 → 5.1.128
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/.cabloy-version +1 -1
- package/CHANGELOG.md +16 -0
- package/cabloy-docs/backend/i18n-guide.md +86 -7
- package/e2e/specs/a-commerce/commerce.spec.ts +93 -8
- package/package.json +1 -1
- package/vona/env/.env +2 -0
- package/vona/env/.env.prod +6 -2
- package/vona/packages-cli/cabloy-cli/package.json +1 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-utils/module-glob/package.json +1 -1
- package/vona/packages-utils/utils/package.json +1 -1
- package/vona/packages-utils/utils/src/vona.ts +8 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +10 -39
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/.metadata/index.ts +1 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productSelectResItem.tsx +3 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productView.tsx +3 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/entity/product.tsx +23 -3
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/model/product.ts +1 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/service/product.ts +7 -2
- package/vona/src/suite/a-commerce/modules/commerce-catalog/test/productPresentation.test.ts +214 -0
- package/vona/src/suite/a-commerce/modules/commerce-payment/src/bean/payScene.commerceOrder.ts +39 -3
- package/vona/src/suite/a-commerce/modules/commerce-payment/src/service/commercePayScene.ts +14 -1
- package/vona/src/suite/a-commerce/modules/commerce-payment/src/service/paymentAttempt.ts +5 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/.metadata/index.ts +17 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/controller/checkout.ts +18 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/checkoutCreate.tsx +3 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/checkoutPaymentMethod.tsx +19 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/checkoutPaymentMethods.tsx +17 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +51 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/paymentOutcome.test.ts +2 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/.metadata/index.ts +94 -55
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/bean/bean.payScene.ts +65 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/bean/meta.redlock.ts +2 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/controller/paymentCallback.ts +32 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/controller/paymentSession.ts +26 -8
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/paymentCallback.ts +99 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/paymentSession.ts +26 -3
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +214 -82
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/refundOperation.ts +27 -2
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/types/payScene.ts +9 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/types/payment.ts +5 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/src/bean/payProvider.mock.ts +7 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/bean/payProvider.paypal.ts +395 -84
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/lib/index.ts +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/lib/paypalGateway.ts +129 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/types/index.ts +2 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/src/bean/payProvider.stripe.ts +7 -0
- package/vona/src/suite-vendor/a-pay/package.json +5 -5
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-cli/cli/package.json +3 -3
- package/zova/packages-cli/cli-set-front/package.json +4 -4
- package/zova/packages-utils/zova-jsx/package.json +3 -3
- package/zova/packages-utils/zova-vite/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +2 -2
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/schemas.ts +8 -0
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/types.ts +175 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/cli/openapi.config.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/commerceTradeCheckout.ts +16 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +8 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +177 -2
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/apiSchema/commerceTradeCheckout.ts +12 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/cart.ts +11 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +25 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +27 -4
- package/zova/src/suite-vendor/a-pay/modules/a-pay/cli/openapi.config.ts +1 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/schemas.ts +20 -8
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/types.ts +292 -32
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/paymentSession.ts +26 -4
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/apiSchema/paymentSession.ts +5 -0
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +2 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/model/paymentSession.ts +12 -0
- package/zova/src/suite-vendor/a-pay/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +4 -4
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Client,
|
|
3
|
+
Environment,
|
|
4
|
+
OrdersController,
|
|
5
|
+
PaymentsController,
|
|
6
|
+
} from '@cabloy/paypal-server-sdk';
|
|
7
|
+
|
|
8
|
+
export interface IPaypalGatewayOptions {
|
|
9
|
+
environment: 'sandbox' | 'live';
|
|
10
|
+
clientId: string;
|
|
11
|
+
clientSecret: string;
|
|
12
|
+
webhookId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IPaypalGateway {
|
|
16
|
+
createOrder(options: IPaypalGatewayOptions, input: unknown): Promise<unknown>;
|
|
17
|
+
captureOrder(options: IPaypalGatewayOptions, input: unknown): Promise<unknown>;
|
|
18
|
+
getOrder(options: IPaypalGatewayOptions, input: unknown): Promise<unknown>;
|
|
19
|
+
refundCapturedPayment(options: IPaypalGatewayOptions, input: unknown): Promise<unknown>;
|
|
20
|
+
getRefund(options: IPaypalGatewayOptions, input: unknown): Promise<unknown>;
|
|
21
|
+
verifyWebhookSignature(
|
|
22
|
+
options: IPaypalGatewayOptions,
|
|
23
|
+
input: { headers: Record<string, string | string[] | undefined>; body: unknown },
|
|
24
|
+
): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class PaypalGatewayError extends Error {
|
|
28
|
+
constructor(
|
|
29
|
+
readonly status: number,
|
|
30
|
+
message: string,
|
|
31
|
+
) {
|
|
32
|
+
super(message);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function createPaypalGateway(fetcher: typeof fetch): IPaypalGateway {
|
|
37
|
+
return {
|
|
38
|
+
async createOrder(options, input) {
|
|
39
|
+
return (await new OrdersController(createClient(options)).createOrder(input as never)).result;
|
|
40
|
+
},
|
|
41
|
+
async captureOrder(options, input) {
|
|
42
|
+
return (await new OrdersController(createClient(options)).captureOrder(input as never))
|
|
43
|
+
.result;
|
|
44
|
+
},
|
|
45
|
+
async getOrder(options, input) {
|
|
46
|
+
return (await new OrdersController(createClient(options)).getOrder(input as never)).result;
|
|
47
|
+
},
|
|
48
|
+
async refundCapturedPayment(options, input) {
|
|
49
|
+
return (
|
|
50
|
+
await new PaymentsController(createClient(options)).refundCapturedPayment(input as never)
|
|
51
|
+
).result;
|
|
52
|
+
},
|
|
53
|
+
async getRefund(options, input) {
|
|
54
|
+
return (await new PaymentsController(createClient(options)).getRefund(input as never)).result;
|
|
55
|
+
},
|
|
56
|
+
async verifyWebhookSignature(options, input) {
|
|
57
|
+
const transmissionId = getHeader(input.headers, 'paypal-transmission-id');
|
|
58
|
+
const transmissionTime = getHeader(input.headers, 'paypal-transmission-time');
|
|
59
|
+
const certUrl = getHeader(input.headers, 'paypal-cert-url');
|
|
60
|
+
const authAlgo = getHeader(input.headers, 'paypal-auth-algo');
|
|
61
|
+
const transmissionSig = getHeader(input.headers, 'paypal-transmission-sig');
|
|
62
|
+
if (!transmissionId || !transmissionTime || !certUrl || !authAlgo || !transmissionSig) {
|
|
63
|
+
throw new PaypalGatewayError(401, 'PayPal webhook transmission headers are invalid');
|
|
64
|
+
}
|
|
65
|
+
const apiBaseUrl =
|
|
66
|
+
options.environment === 'sandbox'
|
|
67
|
+
? 'https://api-m.sandbox.paypal.com'
|
|
68
|
+
: 'https://api-m.paypal.com';
|
|
69
|
+
const tokenResponse = await fetcher(`${apiBaseUrl}/v1/oauth2/token`, {
|
|
70
|
+
method: 'POST',
|
|
71
|
+
headers: {
|
|
72
|
+
'authorization': `Basic ${Buffer.from(`${options.clientId}:${options.clientSecret}`).toString('base64')}`,
|
|
73
|
+
'content-type': 'application/x-www-form-urlencoded',
|
|
74
|
+
},
|
|
75
|
+
body: 'grant_type=client_credentials',
|
|
76
|
+
});
|
|
77
|
+
const token = asRecord(tokenResponse.ok ? await tokenResponse.json() : undefined);
|
|
78
|
+
const accessToken = readString(token.access_token);
|
|
79
|
+
if (!accessToken) {
|
|
80
|
+
throw new PaypalGatewayError(401, 'PayPal webhook verification authentication failed');
|
|
81
|
+
}
|
|
82
|
+
const response = await fetcher(`${apiBaseUrl}/v1/notifications/verify-webhook-signature`, {
|
|
83
|
+
method: 'POST',
|
|
84
|
+
headers: {
|
|
85
|
+
'authorization': `Bearer ${accessToken}`,
|
|
86
|
+
'content-type': 'application/json',
|
|
87
|
+
},
|
|
88
|
+
body: JSON.stringify({
|
|
89
|
+
auth_algo: authAlgo,
|
|
90
|
+
cert_url: certUrl,
|
|
91
|
+
transmission_id: transmissionId,
|
|
92
|
+
transmission_sig: transmissionSig,
|
|
93
|
+
transmission_time: transmissionTime,
|
|
94
|
+
webhook_id: options.webhookId,
|
|
95
|
+
webhook_event: input.body,
|
|
96
|
+
}),
|
|
97
|
+
});
|
|
98
|
+
if (!response.ok) throw new PaypalGatewayError(401, 'PayPal webhook verification failed');
|
|
99
|
+
const result = asRecord(await response.json());
|
|
100
|
+
if (readString(result.verification_status) !== 'SUCCESS') {
|
|
101
|
+
throw new PaypalGatewayError(401, 'PayPal webhook signature is invalid');
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function createClient(options: IPaypalGatewayOptions) {
|
|
108
|
+
return new Client({
|
|
109
|
+
clientCredentialsAuthCredentials: {
|
|
110
|
+
oAuthClientId: options.clientId,
|
|
111
|
+
oAuthClientSecret: options.clientSecret,
|
|
112
|
+
},
|
|
113
|
+
timeout: 0,
|
|
114
|
+
environment: options.environment === 'live' ? Environment.Production : Environment.Sandbox,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function asRecord(value: unknown): Record<string, unknown> {
|
|
119
|
+
return value && typeof value === 'object' ? (value as Record<string, unknown>) : {};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function readString(value: unknown): string | undefined {
|
|
123
|
+
return typeof value === 'string' && value ? value : undefined;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function getHeader(headers: Record<string, string | string[] | undefined>, key: string) {
|
|
127
|
+
const value = headers[key];
|
|
128
|
+
return Array.isArray(value) ? value[0] : value;
|
|
129
|
+
}
|
|
@@ -59,6 +59,13 @@ export class PayProviderStripe
|
|
|
59
59
|
this.app.throw(501, 'Stripe provider is not implemented');
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
async confirmPayment(
|
|
63
|
+
_input: IPayProviderPaymentInput,
|
|
64
|
+
_clientOptions: IPayProviderStripeClientOptions,
|
|
65
|
+
): Promise<IPayProviderPaymentSnapshot> {
|
|
66
|
+
this.app.throw(501, 'Stripe provider is not implemented');
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
async queryPayment(
|
|
63
70
|
_input: IPayProviderPaymentInput,
|
|
64
71
|
_clientOptions: IPayProviderStripeClientOptions,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-suite-a-pay",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"files": [],
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"vona-module-a-pay": "^5.0.
|
|
10
|
-
"vona-module-pay-mock": "^5.0.
|
|
11
|
-
"vona-module-pay-paypal": "^5.0.
|
|
12
|
-
"vona-module-pay-stripe": "^5.0.
|
|
9
|
+
"vona-module-a-pay": "^5.0.4",
|
|
10
|
+
"vona-module-pay-mock": "^5.0.4",
|
|
11
|
+
"vona-module-pay-paypal": "^5.0.4",
|
|
12
|
+
"vona-module-pay-stripe": "^5.0.4"
|
|
13
13
|
},
|
|
14
14
|
"title": "a-pay"
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.102",
|
|
4
4
|
"gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
|
|
5
5
|
"description": "zova cli",
|
|
6
6
|
"keywords": [
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"postpack": "clean-package restore"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cabloy/cli": "^3.1.
|
|
43
|
+
"@cabloy/cli": "^3.1.29",
|
|
44
44
|
"@cabloy/process-helper": "^3.1.8",
|
|
45
45
|
"fs-extra": "^11.3.5",
|
|
46
46
|
"semver": "^7.6.2",
|
|
47
|
-
"zova-cli-set-front": "^1.2.
|
|
47
|
+
"zova-cli-set-front": "^1.2.100"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli-set-front",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.100",
|
|
4
4
|
"gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
|
|
5
5
|
"description": "zova cli-set-front",
|
|
6
6
|
"keywords": [
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
42
42
|
"@babel/plugin-transform-class-properties": "^7.28.6",
|
|
43
43
|
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
44
|
-
"@cabloy/cli": "^3.1.
|
|
44
|
+
"@cabloy/cli": "^3.1.29",
|
|
45
45
|
"@cabloy/extend": "^3.2.8",
|
|
46
46
|
"@cabloy/module-info": "^2.0.3",
|
|
47
47
|
"@cabloy/openapi-typescript": "^7.9.2",
|
|
48
|
-
"@cabloy/utils": "^2.1.
|
|
48
|
+
"@cabloy/utils": "^2.1.27",
|
|
49
49
|
"@cabloy/vite-plugin-babel": "^1.3.3",
|
|
50
50
|
"@cabloy/vue-babel-plugin-jsx": "^2.0.1",
|
|
51
51
|
"@cabloy/word-utils": "^2.1.14",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"vite": "^8.0.14",
|
|
71
71
|
"yaml": "^2.8.3",
|
|
72
72
|
"zova-openapi": "^1.1.17",
|
|
73
|
-
"zova-vite": "^1.1.
|
|
73
|
+
"zova-vite": "^1.1.44"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-jsx",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.82",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "Zova JSX",
|
|
6
6
|
"keywords": [
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@cabloy/compose": "^2.1.9",
|
|
49
|
-
"@cabloy/utils": "^2.1.
|
|
49
|
+
"@cabloy/utils": "^2.1.27",
|
|
50
50
|
"@cabloy/word-utils": "^2.1.14",
|
|
51
51
|
"typestyle": "^2.4.0",
|
|
52
52
|
"vue": "^3.5.38",
|
|
53
|
-
"zova-core": "^5.1.
|
|
53
|
+
"zova-core": "^5.1.82"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-vite",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.44",
|
|
4
4
|
"gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
|
|
5
5
|
"description": "zova vite",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
43
43
|
"@cabloy/dotenv": "^1.2.8",
|
|
44
44
|
"@cabloy/extend": "^3.2.8",
|
|
45
|
-
"@cabloy/module-glob": "^5.3.
|
|
45
|
+
"@cabloy/module-glob": "^5.3.18",
|
|
46
46
|
"@cabloy/module-info": "^2.0.3",
|
|
47
47
|
"@cabloy/vite-plugin-babel": "^1.3.3",
|
|
48
48
|
"@cabloy/vue-babel-plugin-jsx": "^2.0.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.145",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"postpack": "clean-package restore"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"zova-core": "^5.1.
|
|
49
|
-
"zova-suite-a-zova": "^5.1.
|
|
48
|
+
"zova-core": "^5.1.82",
|
|
49
|
+
"zova-suite-a-zova": "^5.1.144"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.82",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@cabloy/localeutil": "^2.1.8",
|
|
53
53
|
"@cabloy/logger": "^1.1.24",
|
|
54
54
|
"@cabloy/module-info": "^2.0.3",
|
|
55
|
-
"@cabloy/utils": "^2.1.
|
|
55
|
+
"@cabloy/utils": "^2.1.27",
|
|
56
56
|
"@cabloy/vue-compiler-sfc": "^3.5.14",
|
|
57
57
|
"@cabloy/vue-reactivity": "^3.5.16",
|
|
58
58
|
"@cabloy/vue-router": "^4.4.16",
|
|
@@ -117,6 +117,14 @@ export type ApiSchemaCommerceTradeDtoCartUpdateItem =
|
|
|
117
117
|
components['schemas']['commerce-trade.dto.cartUpdateItem'];
|
|
118
118
|
export type ApiSchemaCommerceTradeDtoCartUpdateItemPartial =
|
|
119
119
|
Partial<ApiSchemaCommerceTradeDtoCartUpdateItem>;
|
|
120
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethods =
|
|
121
|
+
components['schemas']['commerce-trade.dto.checkoutPaymentMethods'];
|
|
122
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethodsPartial =
|
|
123
|
+
Partial<ApiSchemaCommerceTradeDtoCheckoutPaymentMethods>;
|
|
124
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethod =
|
|
125
|
+
components['schemas']['commerce-trade.dto.checkoutPaymentMethod'];
|
|
126
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethodPartial =
|
|
127
|
+
Partial<ApiSchemaCommerceTradeDtoCheckoutPaymentMethod>;
|
|
120
128
|
export type ApiSchemaCommerceTradeDtoCheckoutResult =
|
|
121
129
|
components['schemas']['commerce-trade.dto.checkoutResult'];
|
|
122
130
|
export type ApiSchemaCommerceTradeDtoCheckoutResultPartial =
|
|
@@ -95,6 +95,38 @@ export interface paths {
|
|
|
95
95
|
patch?: never;
|
|
96
96
|
trace?: never;
|
|
97
97
|
};
|
|
98
|
+
'/api/payment-callback/return': {
|
|
99
|
+
parameters: {
|
|
100
|
+
query?: never;
|
|
101
|
+
header?: never;
|
|
102
|
+
path?: never;
|
|
103
|
+
cookie?: never;
|
|
104
|
+
};
|
|
105
|
+
get: operations['PaymentCallback_returned'];
|
|
106
|
+
put?: never;
|
|
107
|
+
post?: never;
|
|
108
|
+
delete?: never;
|
|
109
|
+
options?: never;
|
|
110
|
+
head?: never;
|
|
111
|
+
patch?: never;
|
|
112
|
+
trace?: never;
|
|
113
|
+
};
|
|
114
|
+
'/api/payment-callback/cancel': {
|
|
115
|
+
parameters: {
|
|
116
|
+
query?: never;
|
|
117
|
+
header?: never;
|
|
118
|
+
path?: never;
|
|
119
|
+
cookie?: never;
|
|
120
|
+
};
|
|
121
|
+
get: operations['PaymentCallback_cancelled'];
|
|
122
|
+
put?: never;
|
|
123
|
+
post?: never;
|
|
124
|
+
delete?: never;
|
|
125
|
+
options?: never;
|
|
126
|
+
head?: never;
|
|
127
|
+
patch?: never;
|
|
128
|
+
trace?: never;
|
|
129
|
+
};
|
|
98
130
|
'/api/payment-session/{id}/start': {
|
|
99
131
|
parameters: {
|
|
100
132
|
query?: never;
|
|
@@ -111,6 +143,22 @@ export interface paths {
|
|
|
111
143
|
patch?: never;
|
|
112
144
|
trace?: never;
|
|
113
145
|
};
|
|
146
|
+
'/api/payment-session/{id}/reconcile': {
|
|
147
|
+
parameters: {
|
|
148
|
+
query?: never;
|
|
149
|
+
header?: never;
|
|
150
|
+
path?: never;
|
|
151
|
+
cookie?: never;
|
|
152
|
+
};
|
|
153
|
+
get?: never;
|
|
154
|
+
put?: never;
|
|
155
|
+
post: operations['PaymentSession_reconcile'];
|
|
156
|
+
delete?: never;
|
|
157
|
+
options?: never;
|
|
158
|
+
head?: never;
|
|
159
|
+
patch?: never;
|
|
160
|
+
trace?: never;
|
|
161
|
+
};
|
|
114
162
|
'/api/payment-session/{id}': {
|
|
115
163
|
parameters: {
|
|
116
164
|
query?: never;
|
|
@@ -527,6 +575,22 @@ export interface paths {
|
|
|
527
575
|
patch: operations['CommerceTradeCart_updateItem'];
|
|
528
576
|
trace?: never;
|
|
529
577
|
};
|
|
578
|
+
'/api/commerce/trade/checkout/payment-methods': {
|
|
579
|
+
parameters: {
|
|
580
|
+
query?: never;
|
|
581
|
+
header?: never;
|
|
582
|
+
path?: never;
|
|
583
|
+
cookie?: never;
|
|
584
|
+
};
|
|
585
|
+
get: operations['CommerceTradeCheckout_paymentMethods'];
|
|
586
|
+
put?: never;
|
|
587
|
+
post?: never;
|
|
588
|
+
delete?: never;
|
|
589
|
+
options?: never;
|
|
590
|
+
head?: never;
|
|
591
|
+
patch?: never;
|
|
592
|
+
trace?: never;
|
|
593
|
+
};
|
|
530
594
|
'/api/commerce/trade/checkout': {
|
|
531
595
|
parameters: {
|
|
532
596
|
query?: never;
|
|
@@ -2652,6 +2716,16 @@ export interface components {
|
|
|
2652
2716
|
/** @description Quantity */
|
|
2653
2717
|
quantity: number;
|
|
2654
2718
|
};
|
|
2719
|
+
'commerce-trade.dto.checkoutPaymentMethods': {
|
|
2720
|
+
items: components['schemas']['commerce-trade.dto.checkoutPaymentMethod'][];
|
|
2721
|
+
defaultKey: string;
|
|
2722
|
+
};
|
|
2723
|
+
'commerce-trade.dto.checkoutPaymentMethod': {
|
|
2724
|
+
key: string;
|
|
2725
|
+
label: string;
|
|
2726
|
+
/** @enum {string} */
|
|
2727
|
+
interaction: 'redirect' | 'embedded';
|
|
2728
|
+
};
|
|
2655
2729
|
'commerce-trade.dto.checkoutResult': {
|
|
2656
2730
|
orderId: number | string;
|
|
2657
2731
|
paymentAttemptId: number | string;
|
|
@@ -2670,6 +2744,7 @@ export interface components {
|
|
|
2670
2744
|
addressId: number | string;
|
|
2671
2745
|
couponGrantId?: number | string | undefined;
|
|
2672
2746
|
correlationId: string;
|
|
2747
|
+
providerCandidateKey?: string | undefined;
|
|
2673
2748
|
};
|
|
2674
2749
|
'commerce-trade.dto.orderMineRes': {
|
|
2675
2750
|
list: components['schemas']['commerce-trade.dto.orderSummary'][];
|
|
@@ -5219,6 +5294,56 @@ export interface operations {
|
|
|
5219
5294
|
};
|
|
5220
5295
|
};
|
|
5221
5296
|
};
|
|
5297
|
+
PaymentCallback_returned: {
|
|
5298
|
+
parameters: {
|
|
5299
|
+
query: {
|
|
5300
|
+
state: string;
|
|
5301
|
+
};
|
|
5302
|
+
header?: never;
|
|
5303
|
+
path?: never;
|
|
5304
|
+
cookie?: never;
|
|
5305
|
+
};
|
|
5306
|
+
requestBody?: never;
|
|
5307
|
+
responses: {
|
|
5308
|
+
200: {
|
|
5309
|
+
headers: {
|
|
5310
|
+
[name: string]: unknown;
|
|
5311
|
+
};
|
|
5312
|
+
content: {
|
|
5313
|
+
'application/json': {
|
|
5314
|
+
code: string;
|
|
5315
|
+
message: string;
|
|
5316
|
+
data?: unknown;
|
|
5317
|
+
};
|
|
5318
|
+
};
|
|
5319
|
+
};
|
|
5320
|
+
};
|
|
5321
|
+
};
|
|
5322
|
+
PaymentCallback_cancelled: {
|
|
5323
|
+
parameters: {
|
|
5324
|
+
query: {
|
|
5325
|
+
state: string;
|
|
5326
|
+
};
|
|
5327
|
+
header?: never;
|
|
5328
|
+
path?: never;
|
|
5329
|
+
cookie?: never;
|
|
5330
|
+
};
|
|
5331
|
+
requestBody?: never;
|
|
5332
|
+
responses: {
|
|
5333
|
+
200: {
|
|
5334
|
+
headers: {
|
|
5335
|
+
[name: string]: unknown;
|
|
5336
|
+
};
|
|
5337
|
+
content: {
|
|
5338
|
+
'application/json': {
|
|
5339
|
+
code: string;
|
|
5340
|
+
message: string;
|
|
5341
|
+
data?: unknown;
|
|
5342
|
+
};
|
|
5343
|
+
};
|
|
5344
|
+
};
|
|
5345
|
+
};
|
|
5346
|
+
};
|
|
5222
5347
|
PaymentSession_start: {
|
|
5223
5348
|
parameters: {
|
|
5224
5349
|
query?: never;
|
|
@@ -5245,6 +5370,32 @@ export interface operations {
|
|
|
5245
5370
|
};
|
|
5246
5371
|
authToken: true;
|
|
5247
5372
|
};
|
|
5373
|
+
PaymentSession_reconcile: {
|
|
5374
|
+
parameters: {
|
|
5375
|
+
query?: never;
|
|
5376
|
+
header?: never;
|
|
5377
|
+
path: {
|
|
5378
|
+
id: number | string;
|
|
5379
|
+
};
|
|
5380
|
+
cookie?: never;
|
|
5381
|
+
};
|
|
5382
|
+
requestBody?: never;
|
|
5383
|
+
responses: {
|
|
5384
|
+
200: {
|
|
5385
|
+
headers: {
|
|
5386
|
+
[name: string]: unknown;
|
|
5387
|
+
};
|
|
5388
|
+
content: {
|
|
5389
|
+
'application/json': {
|
|
5390
|
+
code: string;
|
|
5391
|
+
message: string;
|
|
5392
|
+
data: components['schemas']['a-pay.dto.paymentSessionView'];
|
|
5393
|
+
};
|
|
5394
|
+
};
|
|
5395
|
+
};
|
|
5396
|
+
};
|
|
5397
|
+
authToken: true;
|
|
5398
|
+
};
|
|
5248
5399
|
PaymentSession_view: {
|
|
5249
5400
|
parameters: {
|
|
5250
5401
|
query?: never;
|
|
@@ -6106,6 +6257,30 @@ export interface operations {
|
|
|
6106
6257
|
};
|
|
6107
6258
|
authToken: true;
|
|
6108
6259
|
};
|
|
6260
|
+
CommerceTradeCheckout_paymentMethods: {
|
|
6261
|
+
parameters: {
|
|
6262
|
+
query?: never;
|
|
6263
|
+
header?: never;
|
|
6264
|
+
path?: never;
|
|
6265
|
+
cookie?: never;
|
|
6266
|
+
};
|
|
6267
|
+
requestBody?: never;
|
|
6268
|
+
responses: {
|
|
6269
|
+
200: {
|
|
6270
|
+
headers: {
|
|
6271
|
+
[name: string]: unknown;
|
|
6272
|
+
};
|
|
6273
|
+
content: {
|
|
6274
|
+
'application/json': {
|
|
6275
|
+
code: string;
|
|
6276
|
+
message: string;
|
|
6277
|
+
data: components['schemas']['commerce-trade.dto.checkoutPaymentMethods'];
|
|
6278
|
+
};
|
|
6279
|
+
};
|
|
6280
|
+
};
|
|
6281
|
+
};
|
|
6282
|
+
authToken: true;
|
|
6283
|
+
};
|
|
6109
6284
|
CommerceTradeCheckout_create: {
|
|
6110
6285
|
parameters: {
|
|
6111
6286
|
query?: never;
|
|
@@ -9,6 +9,7 @@ export default function (): ZovaOpenapiConfigModule {
|
|
|
9
9
|
'CommerceTradeCart_updateItem',
|
|
10
10
|
'CommerceTradeCart_deleteItem',
|
|
11
11
|
'CommerceTradeCart_clear',
|
|
12
|
+
'CommerceTradeCheckout_paymentMethods',
|
|
12
13
|
'CommerceTradeCheckout_create',
|
|
13
14
|
'CommerceTradeOrder_select',
|
|
14
15
|
'CommerceTradeOrder_view',
|
|
@@ -6,6 +6,15 @@ import type { components, paths } from './openapi/index.js';
|
|
|
6
6
|
|
|
7
7
|
import { OpenApiBaseURL } from './openapi/index.js';
|
|
8
8
|
|
|
9
|
+
/** CommerceTradeCheckout_paymentMethods */
|
|
10
|
+
export const ApiApiCommerceTradeCheckoutpaymentMethodsPath =
|
|
11
|
+
'/api/commerce/trade/checkout/payment-methods';
|
|
12
|
+
export type ApiApiCommerceTradeCheckoutpaymentMethodsPath =
|
|
13
|
+
'/api/commerce/trade/checkout/payment-methods';
|
|
14
|
+
export type ApiApiCommerceTradeCheckoutpaymentMethodsMethod = 'get';
|
|
15
|
+
export type ApiApiCommerceTradeCheckoutpaymentMethodsResponseBody =
|
|
16
|
+
paths[ApiApiCommerceTradeCheckoutpaymentMethodsPath][ApiApiCommerceTradeCheckoutpaymentMethodsMethod]['responses']['200']['content']['application/json']['data'];
|
|
17
|
+
|
|
9
18
|
/** CommerceTradeCheckout_create */
|
|
10
19
|
export const ApiApiCommerceTradeCheckoutcreatePath = '/api/commerce/trade/checkout';
|
|
11
20
|
export type ApiApiCommerceTradeCheckoutcreatePath = '/api/commerce/trade/checkout';
|
|
@@ -17,6 +26,13 @@ export type ApiApiCommerceTradeCheckoutcreateResponseBody =
|
|
|
17
26
|
|
|
18
27
|
@Api()
|
|
19
28
|
export class ApiCommerceTradeCheckout extends BeanApiBase {
|
|
29
|
+
paymentMethods(options?: IApiActionOptions) {
|
|
30
|
+
return this.$fetch.get<any, ApiApiCommerceTradeCheckoutpaymentMethodsResponseBody>(
|
|
31
|
+
ApiApiCommerceTradeCheckoutpaymentMethodsPath,
|
|
32
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
20
36
|
create(body: ApiApiCommerceTradeCheckoutcreateRequestBody, options?: IApiActionOptions) {
|
|
21
37
|
return this.$fetch.post<any, ApiApiCommerceTradeCheckoutcreateResponseBody>(
|
|
22
38
|
ApiApiCommerceTradeCheckoutcreatePath,
|
|
@@ -117,6 +117,14 @@ export type ApiSchemaCommerceTradeDtoCartUpdateItem =
|
|
|
117
117
|
components['schemas']['commerce-trade.dto.cartUpdateItem'];
|
|
118
118
|
export type ApiSchemaCommerceTradeDtoCartUpdateItemPartial =
|
|
119
119
|
Partial<ApiSchemaCommerceTradeDtoCartUpdateItem>;
|
|
120
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethods =
|
|
121
|
+
components['schemas']['commerce-trade.dto.checkoutPaymentMethods'];
|
|
122
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethodsPartial =
|
|
123
|
+
Partial<ApiSchemaCommerceTradeDtoCheckoutPaymentMethods>;
|
|
124
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethod =
|
|
125
|
+
components['schemas']['commerce-trade.dto.checkoutPaymentMethod'];
|
|
126
|
+
export type ApiSchemaCommerceTradeDtoCheckoutPaymentMethodPartial =
|
|
127
|
+
Partial<ApiSchemaCommerceTradeDtoCheckoutPaymentMethod>;
|
|
120
128
|
export type ApiSchemaCommerceTradeDtoCheckoutResult =
|
|
121
129
|
components['schemas']['commerce-trade.dto.checkoutResult'];
|
|
122
130
|
export type ApiSchemaCommerceTradeDtoCheckoutResultPartial =
|