@akinon/next 1.112.0-snapshot-ZERO-3855-20251124131245 → 1.112.0-snapshot-ZERO-3859-20251125183557

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.112.0-snapshot-ZERO-3855-20251124131245
3
+ ## 1.112.0-snapshot-ZERO-3859-20251125183557
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 591e345: ZERO-3855: Enhance credit card payment handling in checkout middlewares
7
+ - cbcfdf4: ZERO-3859: Haso payment gateway implmeneted
8
8
 
9
9
  ## 1.111.0
10
10
 
@@ -24,7 +24,8 @@ enum Plugin {
24
24
  FlowPayment = 'pz-flow-payment',
25
25
  VirtualTryOn = 'pz-virtual-try-on',
26
26
  Hepsipay = 'pz-hepsipay',
27
- MasterpassRest = 'pz-masterpass-rest'
27
+ MasterpassRest = 'pz-masterpass-rest',
28
+ Haso = 'pz-haso'
28
29
  }
29
30
 
30
31
  export enum Component {
@@ -54,7 +55,8 @@ export enum Component {
54
55
  IyzicoSavedCard = 'IyzicoSavedCardOption',
55
56
  Hepsipay = 'Hepsipay',
56
57
  FlowPayment = 'FlowPayment',
57
- MasterpassRest = 'MasterpassRestOption'
58
+ MasterpassRest = 'MasterpassRestOption',
59
+ HasoPaymentGateway = 'HasoPaymentGateway'
58
60
  }
59
61
 
60
62
  const PluginComponents = new Map([
@@ -92,7 +94,8 @@ const PluginComponents = new Map([
92
94
  [Plugin.FlowPayment, [Component.FlowPayment]],
93
95
  [Plugin.VirtualTryOn, [Component.VirtualTryOnPlugin]],
94
96
  [Plugin.Hepsipay, [Component.Hepsipay]],
95
- [Plugin.MasterpassRest, [Component.MasterpassRest]]
97
+ [Plugin.MasterpassRest, [Component.MasterpassRest]],
98
+ [Plugin.Haso, [Component.HasoPaymentGateway]]
96
99
  ]);
97
100
 
98
101
  const getPlugin = (component: Component) => {
@@ -104,10 +107,10 @@ const getPlugin = (component: Component) => {
104
107
  };
105
108
 
106
109
  export default function PluginModule({
107
- component,
108
- props,
109
- children
110
- }: {
110
+ component,
111
+ props,
112
+ children
113
+ }: {
111
114
  component: Component;
112
115
  props?: any;
113
116
  children?: React.ReactNode;
@@ -165,6 +168,8 @@ export default function PluginModule({
165
168
  promise = import(`${'@akinon/pz-virtual-try-on'}`);
166
169
  } else if (plugin === Plugin.MasterpassRest) {
167
170
  promise = import(`${'@akinon/pz-masterpass-rest'}`);
171
+ } else if (plugin === Plugin.Haso) {
172
+ promise = import(`${'@akinon/pz-haso'}`);
168
173
  }
169
174
  } catch (error) {
170
175
  logger.error(error);
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.112.0-snapshot-ZERO-3855-20251124131245",
4
+ "version": "1.112.0-snapshot-ZERO-3859-20251125183557",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -35,7 +35,7 @@
35
35
  "set-cookie-parser": "2.6.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@akinon/eslint-plugin-projectzero": "1.112.0-snapshot-ZERO-3855-20251124131245",
38
+ "@akinon/eslint-plugin-projectzero": "1.112.0-snapshot-ZERO-3859-20251125183557",
39
39
  "@babel/core": "7.26.10",
40
40
  "@babel/preset-env": "7.26.9",
41
41
  "@babel/preset-typescript": "7.27.0",
package/plugins.js CHANGED
@@ -20,5 +20,6 @@ module.exports = [
20
20
  'pz-hepsipay',
21
21
  'pz-flow-payment',
22
22
  'pz-virtual-try-on',
23
- 'pz-masterpass-rest'
23
+ 'pz-masterpass-rest',
24
+ 'pz-haso'
24
25
  ];
@@ -204,25 +204,15 @@ export const contextListMiddleware: Middleware = ({
204
204
  (ctx) => ctx.page_name === 'DeliveryOptionSelectionPage'
205
205
  )
206
206
  ) {
207
- const isCreditCardPayment =
208
- preOrder?.payment_option?.payment_type === 'credit_card' ||
209
- preOrder?.payment_option?.payment_type === 'masterpass';
210
-
211
207
  if (context.page_context.card_type) {
212
208
  dispatch(setCardType(context.page_context.card_type));
213
- } else if (isCreditCardPayment) {
214
- dispatch(setCardType(null));
215
209
  }
216
210
 
217
211
  if (
218
212
  context.page_context.installments &&
219
213
  preOrder?.payment_option?.payment_type !== 'masterpass_rest'
220
214
  ) {
221
- if (!isCreditCardPayment || context.page_context.card_type) {
222
- dispatch(
223
- setInstallmentOptions(context.page_context.installments)
224
- );
225
- }
215
+ dispatch(setInstallmentOptions(context.page_context.installments));
226
216
  }
227
217
  }
228
218
 
@@ -14,17 +14,9 @@ export const installmentOptionMiddleware: Middleware = ({
14
14
  return result;
15
15
  }
16
16
 
17
- const { installmentOptions, cardType } = getState().checkout;
17
+ const { installmentOptions } = getState().checkout;
18
18
  const { endpoints: apiEndpoints } = checkoutApi;
19
19
 
20
- const isCreditCardPayment =
21
- preOrder?.payment_option?.payment_type === 'credit_card' ||
22
- preOrder?.payment_option?.payment_type === 'masterpass';
23
-
24
- if (isCreditCardPayment && !cardType) {
25
- return result;
26
- }
27
-
28
20
  if (
29
21
  !preOrder?.installment &&
30
22
  preOrder?.payment_option?.payment_type !== 'saved_card' &&