@akinon/next 1.53.0 → 1.54.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/CHANGELOG.md +8 -0
- package/data/client/checkout.ts +9 -3
- package/data/server/product.ts +13 -8
- package/package.json +2 -2
- package/plugins.d.ts +1 -0
- package/types/commerce/order.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 1.54.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
|
|
8
|
+
- c47be30: ZERO-2744: Update Order and OrderItem types
|
|
9
|
+
- e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
|
|
10
|
+
|
|
3
11
|
## 1.53.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/data/client/checkout.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setBankAccounts,
|
|
3
|
+
setCardType,
|
|
3
4
|
setInstallmentOptions,
|
|
4
5
|
setPaymentStepBusy,
|
|
5
6
|
setSelectedBankAccountPk,
|
|
6
7
|
setSelectedCreditPaymentPk,
|
|
7
|
-
setShippingStepBusy
|
|
8
|
-
setCardType
|
|
8
|
+
setShippingStepBusy
|
|
9
9
|
} from '../../redux/reducers/checkout';
|
|
10
10
|
import {
|
|
11
11
|
CheckoutContext,
|
|
@@ -20,6 +20,7 @@ import { AppDispatch, AppStore, store } from 'redux/store';
|
|
|
20
20
|
import settings from 'settings';
|
|
21
21
|
import { showMobile3dIframe } from '../../utils/mobile-3d-iframe';
|
|
22
22
|
import {
|
|
23
|
+
setCvcRequired,
|
|
23
24
|
setError,
|
|
24
25
|
setOtpModalVisible
|
|
25
26
|
} from '@akinon/pz-masterpass/src/redux/reducer';
|
|
@@ -113,7 +114,8 @@ const completeMasterpassPayment = async (
|
|
|
113
114
|
? await buildDirectPurchaseForm(commonFormValues, params)
|
|
114
115
|
: await buildPurchaseForm({
|
|
115
116
|
...commonFormValues,
|
|
116
|
-
selectedCard
|
|
117
|
+
selectedCard,
|
|
118
|
+
cardCvc: params?.card_cvv
|
|
117
119
|
});
|
|
118
120
|
|
|
119
121
|
window.MFS?.[
|
|
@@ -151,6 +153,10 @@ const completeMasterpassPayment = async (
|
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
153
155
|
|
|
156
|
+
if (['5013', '5182'].includes(response.responseCode)) {
|
|
157
|
+
dispatch(setCvcRequired(true));
|
|
158
|
+
}
|
|
159
|
+
|
|
154
160
|
if (
|
|
155
161
|
response.token &&
|
|
156
162
|
(response.responseCode == '0000' || response.responseCode == '')
|
package/data/server/product.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { Cache, CacheKey } from '../../lib/cache';
|
|
2
2
|
import { product } from '../urls';
|
|
3
|
-
import {
|
|
4
|
-
BreadcrumbResultType,
|
|
5
|
-
ProductCategoryResult,
|
|
6
|
-
ProductResult
|
|
7
|
-
} from '../../types';
|
|
3
|
+
import { ProductCategoryResult, ProductResult } from '../../types';
|
|
8
4
|
import appFetch from '../../utils/app-fetch';
|
|
5
|
+
import logger from '../../utils/log';
|
|
9
6
|
|
|
10
7
|
type GetProduct = {
|
|
11
8
|
pk: number;
|
|
@@ -50,9 +47,17 @@ const getProductDataHandler = ({
|
|
|
50
47
|
}
|
|
51
48
|
);
|
|
52
49
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
)
|
|
50
|
+
const menuItemModel = productCategoryData?.results[0]?.menuitemmodel;
|
|
51
|
+
|
|
52
|
+
if (!menuItemModel) {
|
|
53
|
+
logger.warn('menuItemModel is undefined, skipping breadcrumbData fetch', {
|
|
54
|
+
handler: 'getProductDataHandler',
|
|
55
|
+
pk
|
|
56
|
+
});
|
|
57
|
+
return { data, breadcrumbData: undefined };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const breadcrumbUrl = product.breadcrumbUrl(menuItemModel);
|
|
56
61
|
|
|
57
62
|
const breadcrumbData = await appFetch<any>(breadcrumbUrl, {
|
|
58
63
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.54.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"set-cookie-parser": "2.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
32
|
+
"@akinon/eslint-plugin-projectzero": "1.54.0",
|
|
33
33
|
"@types/react-redux": "7.1.30",
|
|
34
34
|
"@types/set-cookie-parser": "2.4.7",
|
|
35
35
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
package/plugins.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare module '@akinon/pz-masterpass/src/utils' {
|
|
|
12
12
|
declare module '@akinon/pz-masterpass/src/redux/reducer' {
|
|
13
13
|
export const setError: any;
|
|
14
14
|
export const setOtpModalVisible: any;
|
|
15
|
+
export const setCvcRequired: any;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
declare module '@akinon/pz-otp' {
|