@akinon/pz-masterpass-rest 1.120.0-rc.5 → 1.120.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-masterpass-rest",
3
- "version": "1.120.0-rc.5",
3
+ "version": "1.120.0",
4
4
  "main": "src/index.ts",
5
5
  "types": "src/index.d.ts",
6
6
  "description": "Modern React-based Masterpass REST API integration package for ProjectZero e-commerce platform",
@@ -35,8 +35,8 @@ const CardList: React.FC<CardListProps> = ({
35
35
  key={card.uniqueCardNumber}
36
36
  className={`border transition-all cursor-pointer ${
37
37
  isSelected
38
- ? 'border-[#000000] bg-[#000000]/5'
39
- : 'border-[#eeeeee] hover:border-[#ebebeb]'
38
+ ? 'border-primary bg-primary/5'
39
+ : 'border-gray-200 hover:border-gray-300'
40
40
  }`}
41
41
  onClick={() => onCardSelect(card)}
42
42
  >
@@ -48,13 +48,13 @@ const CardList: React.FC<CardListProps> = ({
48
48
  w-4 h-4 border-2 rounded-full flex items-center justify-center
49
49
  ${
50
50
  isSelected
51
- ? 'border-[#000000] bg-primary'
52
- : 'border-[#ebebeb]'
51
+ ? 'border-primary bg-primary'
52
+ : 'border-gray-300'
53
53
  }
54
54
  `}
55
55
  >
56
56
  {isSelected && (
57
- <div className="w-2 h-2 bg-[#ffffff] rounded-full"></div>
57
+ <div className="w-2 h-2 bg-white rounded-full"></div>
58
58
  )}
59
59
  </div>
60
60
 
@@ -64,21 +64,21 @@ const CardList: React.FC<CardListProps> = ({
64
64
  className="w-8 h-6 object-contain"
65
65
  />
66
66
  <div>
67
- <div className="font-medium text-[#4a4f54]">
67
+ <div className="font-medium text-gray-900">
68
68
  {card.maskedCardNumber}
69
69
  </div>
70
- <div className="text-sm text-[#c9c9c9]">{card.cardAlias}</div>
70
+ <div className="text-sm text-gray-500">{card.cardAlias}</div>
71
71
  <div className="flex items-center space-x-2 mt-1">
72
72
  <span className="text-xs px-2 py-1 bg-gray-100">
73
73
  {card.cardType}
74
74
  </span>
75
75
  {card.isDefaultCard && (
76
- <span className="text-xs px-2 py-1 bg-[#000000]/10 text-[#000000]">
76
+ <span className="text-xs px-2 py-1 bg-primary/10 text-primary">
77
77
  {texts.defaultCardText}
78
78
  </span>
79
79
  )}
80
80
  {card.expireSoon && (
81
- <span className="text-xs px-2 py-1 bg-[#d08800]/10 text-[#d08800]">
81
+ <span className="text-xs px-2 py-1 bg-warning/10 text-warning">
82
82
  {texts.expiresSoonText}
83
83
  </span>
84
84
  )}
@@ -88,7 +88,7 @@ const CardList: React.FC<CardListProps> = ({
88
88
 
89
89
  {onRemove && (
90
90
  <button
91
- className="p-2 text-[#d7d7d7] hover:text-[#ff6367] transition-colors disabled:opacity-50 bg-[#f5f5f5] rounded-full"
91
+ className="p-2 text-gray-400 hover:text-red-500 transition-colors disabled:opacity-50 bg-gray-100 rounded-full"
92
92
  disabled={removingCardId === card.uniqueCardNumber}
93
93
  onClick={(e) => {
94
94
  e.stopPropagation();
@@ -96,7 +96,7 @@ const CardList: React.FC<CardListProps> = ({
96
96
  }}
97
97
  >
98
98
  {removingCardId === card.uniqueCardNumber ? (
99
- <div className="animate-spin h-5 w-5 border-b-2 border-[#ff6367]"></div>
99
+ <div className="animate-spin h-5 w-5 border-b-2 border-red-500"></div>
100
100
  ) : (
101
101
  <svg
102
102
  xmlns="http://www.w3.org/2000/svg"
@@ -108,7 +108,7 @@ const CardList: React.FC<CardListProps> = ({
108
108
  strokeWidth="2"
109
109
  strokeLinecap="round"
110
110
  strokeLinejoin="round"
111
- className="text-[#9d9d9d]"
111
+ className="text-gray-600"
112
112
  >
113
113
  <path d="M3 6h18" />
114
114
  <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" />
@@ -121,17 +121,17 @@ const CardList: React.FC<CardListProps> = ({
121
121
 
122
122
  {isSelected && cvcRequired && (
123
123
  <div
124
- className="border-t border-[#eeeeee] p-4 bg-[#f7f7f7]"
124
+ className="border-t border-gray-200 p-4 bg-gray-50"
125
125
  onClick={(e) => e.stopPropagation()}
126
126
  >
127
127
  <div className="flex items-center gap-4">
128
128
  <div className="flex-1">
129
129
  <label
130
130
  htmlFor={`cvc-${card.uniqueCardNumber}`}
131
- className="block text-sm font-medium text-[#686868] mb-2"
131
+ className="block text-sm font-medium text-gray-700 mb-2"
132
132
  >
133
133
  {texts.cvcCardLabel}
134
- <span className="text-[#ff6367]"> *</span>
134
+ <span className="text-red-500"> *</span>
135
135
  </label>
136
136
  <Input
137
137
  id={`cvc-${card.uniqueCardNumber}`}
@@ -148,7 +148,7 @@ const CardList: React.FC<CardListProps> = ({
148
148
  maxLength={expectedCvcLength}
149
149
  className="w-32"
150
150
  />
151
- <p className="text-xs text-[#c9c9c9] mt-1">
151
+ <p className="text-xs text-gray-500 mt-1">
152
152
  {texts.cvcCardHelpText
153
153
  ?.replace('{length}', expectedCvcLength.toString())
154
154
  .replace(
@@ -159,11 +159,11 @@ const CardList: React.FC<CardListProps> = ({
159
159
  )}
160
160
  </p>
161
161
  </div>
162
- <div className="flex items-center text-sm text-[#9d9d9d]">
162
+ <div className="flex items-center text-sm text-gray-600">
163
163
  <Icon
164
164
  name="shield-check"
165
165
  size={16}
166
- className="mr-1 text-[#00a63d]"
166
+ className="mr-1 text-green-600"
167
167
  />
168
168
  <span>{texts.secureCardText}</span>
169
169
  </div>
@@ -27,7 +27,7 @@ const ConfirmationModal: React.FC<ConfirmationModalProps> = ({
27
27
  <div className="flex gap-3 justify-center">
28
28
  <Button
29
29
  appearance="outlined"
30
- className="px-6 py-3 h-auto hover:bg-[#f7f7f7] transition-colors"
30
+ className="px-6 py-3 h-auto hover:bg-gray-50 transition-colors"
31
31
  onClick={onClose}
32
32
  disabled={isLoading}
33
33
  >
@@ -146,17 +146,17 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
146
146
  const expectedCVVLength = getCvcLength(cardType);
147
147
 
148
148
  return (
149
- <div className="bg-[#ffffff] border border-[#eeeeee] shadow-sm">
150
- <div className="flex justify-start items-center border-b border-[#eeeeee] px-4 py-3 sm:px-6 sm:py-4">
149
+ <div className="bg-white border border-gray-200 shadow-sm">
150
+ <div className="flex justify-start items-center border-b border-gray-200 px-4 py-3 sm:px-6 sm:py-4">
151
151
  <div className="flex items-center gap-2">
152
- <Icon name="credit-card" size={20} className="text-[#9d9d9d]" />
153
- <span className="text-[#181818] text-lg font-medium sm:text-xl">
152
+ <Icon name="credit-card" size={20} className="text-gray-600" />
153
+ <span className="text-black-800 text-lg font-medium sm:text-xl">
154
154
  {texts.creditCardInfoTitle}
155
155
  </span>
156
156
  {isBinChecking && (
157
157
  <div className="flex items-center gap-2 ml-auto">
158
158
  <LoaderSpinner className="w-4 h-4" />
159
- <span className="text-sm text-[#2d2d2d]">
159
+ <span className="text-sm text-gray-500">
160
160
  {texts.checkingCardText}
161
161
  </span>
162
162
  </div>
@@ -169,7 +169,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
169
169
  <div className="space-y-2">
170
170
  <label
171
171
  htmlFor="cardNumber"
172
- className="block text-sm font-medium text-[#686868]"
172
+ className="block text-sm font-medium text-gray-700"
173
173
  >
174
174
  {texts.cardNumberLabel}
175
175
  </label>
@@ -194,7 +194,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
194
194
  errors.cardNumber && '-translate-y-full'
195
195
  )}
196
196
  >
197
- <span className="flex text-sm font-medium text-[#9d9d9d] bg-[#f5f5f5] px-2 py-1">
197
+ <span className="flex text-sm font-medium text-gray-600 bg-gray-100 px-2 py-1">
198
198
  <img
199
199
  src={
200
200
  getCardIcon(watchedCardNumber.replace(/\D/g, '')).src
@@ -211,7 +211,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
211
211
  <div className="space-y-2">
212
212
  <label
213
213
  htmlFor="cardholderName"
214
- className="block text-sm font-medium text-[#686868]"
214
+ className="block text-sm font-medium text-gray-700"
215
215
  >
216
216
  {texts.cardholderNameLabel}
217
217
  </label>
@@ -228,7 +228,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
228
228
  <div className="space-y-2">
229
229
  <label
230
230
  htmlFor="expiryDate"
231
- className="block text-sm font-medium text-[#686868]"
231
+ className="block text-sm font-medium text-gray-700"
232
232
  >
233
233
  {texts.expiryDateLabel}
234
234
  </label>
@@ -248,7 +248,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
248
248
  <div className="space-y-2">
249
249
  <label
250
250
  htmlFor="cvv"
251
- className="block text-sm font-medium text-[#686868]"
251
+ className="block text-sm font-medium text-gray-700"
252
252
  >
253
253
  {texts.cvcLabel}
254
254
  </label>
@@ -278,18 +278,18 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
278
278
  {...register('saveCard')}
279
279
  id="saveCard"
280
280
  type="checkbox"
281
- className="h-4 w-4 mt-0.5 text-[#000000] focus:ring-primary border-[#ebebeb]"
281
+ className="h-4 w-4 mt-0.5 text-primary focus:ring-primary border-gray-300"
282
282
  />
283
283
  <label
284
284
  htmlFor="saveCard"
285
- className="text-sm font-medium text-[#686868] cursor-pointer"
285
+ className="text-sm font-medium text-gray-700 cursor-pointer"
286
286
  >
287
287
  {texts.saveCardTermsPrefix}{' '}
288
288
  <a
289
289
  href="https://www.masterpassturkiye.com/terms-and-conditions"
290
290
  target="_blank"
291
291
  rel="noopener noreferrer"
292
- className="text-[#000000] underline hover:text-[#181818]"
292
+ className="text-primary underline hover:text-primary-dark"
293
293
  >
294
294
  {texts.saveCardTermsLink}
295
295
  </a>
@@ -301,7 +301,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
301
301
  <div className="space-y-2 pt-2">
302
302
  <label
303
303
  htmlFor="cardAlias"
304
- className="block text-sm font-medium text-[#686868]"
304
+ className="block text-sm font-medium text-gray-700"
305
305
  >
306
306
  {texts.cardAliasLabel}
307
307
  </label>
@@ -320,7 +320,7 @@ const CreditCardForm: React.FC<CreditCardFormProps> = ({
320
320
  )}
321
321
 
322
322
  {watchedSaveCard && (
323
- <div className="flex flex-col sm:flex-row gap-3 pt-6 border-t border-[#eeeeee]">
323
+ <div className="flex flex-col sm:flex-row gap-3 pt-6 border-t border-gray-200">
324
324
  <Button
325
325
  type="submit"
326
326
  className="flex-1 group inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
@@ -13,11 +13,11 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
13
13
  texts
14
14
  }) => {
15
15
  return (
16
- <div className="bg-white border border-[#eeeeee] shadow-sm">
17
- <div className="border-b border-[#eeeeee] px-4 py-3 sm:px-6 sm:py-4">
16
+ <div className="bg-white border border-gray-200 shadow-sm">
17
+ <div className="border-b border-gray-200 px-4 py-3 sm:px-6 sm:py-4">
18
18
  <div className="flex items-center gap-2">
19
19
  <Icon name="credit-card" size={20} className="text-gray-600" />
20
- <span className="text-[#181818] text-lg font-medium sm:text-xl">
20
+ <span className="text-black-800 text-lg font-medium sm:text-xl">
21
21
  {texts.installmentOptionsText}
22
22
  </span>
23
23
  </div>
@@ -26,10 +26,10 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
26
26
  <div className="p-4 sm:p-6">
27
27
  {/* Card Type Display */}
28
28
  {cardType && (
29
- <div className="mb-4 p-3 bg-[#f7f7f7] border border-[#eeeeee]">
29
+ <div className="mb-4 p-3 bg-gray-50 border border-gray-200">
30
30
  <div className="flex items-center gap-2">
31
31
  <Icon name="credit-card" size={16} className="text-gray-600" />
32
- <span className="text-sm font-medium text-[#686868]">
32
+ <span className="text-sm font-medium text-gray-700">
33
33
  {texts.cardTypeLabel}
34
34
  </span>
35
35
  <img
@@ -55,8 +55,8 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
55
55
  relative flex items-center justify-between p-3 border transition-all cursor-pointer
56
56
  ${
57
57
  isSelected
58
- ? 'border-[#000000] bg-[#000000]/5'
59
- : 'border-[#eeeeee] hover:border-[#ebebeb]'
58
+ ? 'border-primary bg-primary/5'
59
+ : 'border-gray-200 hover:border-gray-300'
60
60
  }
61
61
  `}
62
62
  >
@@ -66,13 +66,13 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
66
66
  w-4 h-4 border-2 rounded-full flex items-center justify-center
67
67
  ${
68
68
  isSelected
69
- ? 'border-[#000000] bg-[#000000]'
70
- : 'border-[#ebebeb]'
69
+ ? 'border-primary bg-primary'
70
+ : 'border-gray-300'
71
71
  }
72
72
  `}
73
73
  >
74
74
  {isSelected && (
75
- <div className="w-2 h-2 bg-[#ffffff] rounded-full"></div>
75
+ <div className="w-2 h-2 bg-white rounded-full"></div>
76
76
  )}
77
77
  </div>
78
78
 
@@ -80,7 +80,7 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
80
80
  <div className="flex-1 ml-3">
81
81
  <div className="flex items-center justify-between">
82
82
  <div>
83
- <span className="font-medium text-[#4a4f54]">
83
+ <span className="font-medium text-gray-900">
84
84
  {installment.installment_count === 1
85
85
  ? texts.singlePaymentText
86
86
  : texts.installmentsText?.replace(
@@ -89,17 +89,17 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
89
89
  )}
90
90
  </span>
91
91
  {isNoInterest && (
92
- <span className="text-xs bg-[#84978a] text-[#004e21] px-2 py-1 ml-2">
92
+ <span className="text-xs bg-green-100 text-green-700 px-2 py-1 ml-2">
93
93
  {texts.noInterestText}
94
94
  </span>
95
95
  )}
96
96
  </div>
97
97
  <div className="text-right">
98
- <div className="font-semibold text-[#4a4f54]">
98
+ <div className="font-semibold text-gray-900">
99
99
  {installment.price_with_accrued_interest}
100
100
  </div>
101
101
  {installment.installment_count > 1 && (
102
- <div className="text-sm text-[#f7f7f7]">
102
+ <div className="text-sm text-gray-500">
103
103
  {installment.monthly_price_with_accrued_interest}
104
104
  {texts.perMonthText}
105
105
  </div>
@@ -114,7 +114,7 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
114
114
 
115
115
  {/* Payment Button */}
116
116
  {selectedInstallment && onProceedToPayment && (
117
- <div className="pt-4 border-t border-[#eeeeee]">
117
+ <div className="pt-4 border-t border-gray-200">
118
118
  <Button
119
119
  onClick={onProceedToPayment}
120
120
  disabled={isLoading || paymentLoading}
@@ -122,7 +122,7 @@ const InstallmentList: React.FC<InstallmentListProps> = ({
122
122
  >
123
123
  {paymentLoading ? (
124
124
  <div className="flex items-center justify-center">
125
- <div className="animate-spin h-4 w-4 border-b-2 border-[#ffffff]"></div>
125
+ <div className="animate-spin h-4 w-4 border-b-2 border-white"></div>
126
126
  <span className="ml-2">{texts.processingPaymentText}</span>
127
127
  </div>
128
128
  ) : (
@@ -11,14 +11,18 @@ const MasterpassSecurityInfo: React.FC<MasterpassSecurityInfoProps> = ({
11
11
  }) => {
12
12
  return (
13
13
  <div className="flex flex-col items-center gap-2">
14
- <img src={mpBlackLogo.src} alt="Masterpass" className="h-6" />
15
- <p className="text-xs text-center text-[#9d9d9d]">
14
+ <img
15
+ src={mpBlackLogo.src}
16
+ alt="Masterpass"
17
+ className="h-6"
18
+ />
19
+ <p className="text-xs text-center text-gray-600">
16
20
  {texts.masterpassSecurityPrefix}{' '}
17
21
  <a
18
22
  href="https://www.mastercard.com.tr/tr-tr/tuketiciler/odeme-secenekleri/masterpass.html"
19
23
  target="_blank"
20
24
  rel="noopener noreferrer"
21
- className="text-[#000000] underline hover:text-[#181818] font-medium"
25
+ className="text-primary underline hover:text-primary-dark font-medium"
22
26
  >
23
27
  {texts.masterpassSecurityLink}
24
28
  </a>
@@ -204,21 +204,15 @@ const OTPModal: React.FC<OTPModalProps> = ({
204
204
  >
205
205
  <div className="px-6">
206
206
  {getTitle() && (
207
- <h3 className="text-center mt-4 text-lg font-semibold">
208
- {getTitle()}
209
- </h3>
207
+ <h3 className="text-center mt-4 text-lg font-semibold">{getTitle()}</h3>
210
208
  )}
211
- <p className="text-center mt-2 text-sm text-gray-600">
212
- {getDescription()}
213
- </p>
209
+ <p className="text-center mt-2 text-sm text-gray-600">{getDescription()}</p>
214
210
  <div className="flex flex-col gap-3 p-5 w-3/4 m-auto">
215
211
  <Input
216
212
  type="text"
217
213
  value={otp}
218
214
  onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
219
- setOtp(
220
- e.target.value.replace(/\D/g, '').slice(0, getMaxLength())
221
- );
215
+ setOtp(e.target.value.replace(/\D/g, '').slice(0, getMaxLength()));
222
216
  setError(null);
223
217
  }}
224
218
  maxLength={getMaxLength()}
@@ -228,9 +222,7 @@ const OTPModal: React.FC<OTPModalProps> = ({
228
222
  placeholder={getPlaceholder()}
229
223
  />
230
224
  {getHelperText() && (
231
- <p className="text-xs text-gray-500 text-center">
232
- {getHelperText()}
233
- </p>
225
+ <p className="text-xs text-gray-500 text-center">{getHelperText()}</p>
234
226
  )}
235
227
  {error && <p className="text-error text-xs text-center">{error}</p>}
236
228
  <Button
@@ -11,12 +11,12 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
11
11
  const hasStoredCards = cards && cards.length > 0;
12
12
 
13
13
  return (
14
- <div className="bg-white border border-[#eeeeee] shadow-sm">
15
- <div className="border-b border-[#eeeeee] px-4 py-3 sm:px-6 sm:py-4">
16
- <h3 className="text-lg font-medium text-[#4a4f54]">
14
+ <div className="bg-white border border-gray-200 shadow-sm">
15
+ <div className="border-b border-gray-200 px-4 py-3 sm:px-6 sm:py-4">
16
+ <h3 className="text-lg font-medium text-gray-900">
17
17
  {texts.paymentMethodTitle}
18
18
  </h3>
19
- <p className="text-sm text-[#c9c9c9] mt-1">
19
+ <p className="text-sm text-gray-500 mt-1">
20
20
  {texts.paymentMethodDescription}
21
21
  </p>
22
22
  </div>
@@ -31,7 +31,7 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
31
31
  >
32
32
  {hasStoredCards && (
33
33
  <div
34
- className="flex items-center p-4 border border-[#eeeeee] hover:border-[#000000] transition-colors cursor-pointer"
34
+ className="flex items-center p-4 border border-gray-200 hover:border-primary transition-colors cursor-pointer"
35
35
  onClick={() => onMethodChange('stored_card')}
36
36
  >
37
37
  <div
@@ -39,26 +39,26 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
39
39
  w-4 h-4 border-2 rounded-full flex items-center justify-center mr-3
40
40
  ${
41
41
  selectedMethod === 'stored_card'
42
- ? 'border-[#000000] bg-[#000000]'
43
- : 'border-[#ebebeb]'
42
+ ? 'border-primary bg-primary'
43
+ : 'border-gray-300'
44
44
  }
45
45
  `}
46
46
  >
47
47
  {selectedMethod === 'stored_card' && (
48
- <div className="w-2 h-2 bg-[#ffffff] rounded-full"></div>
48
+ <div className="w-2 h-2 bg-white rounded-full"></div>
49
49
  )}
50
50
  </div>
51
51
  <div className="flex items-center">
52
52
  <Icon
53
53
  name="credit-card"
54
54
  size={20}
55
- className="text-[#9d9d9d] mr-3"
55
+ className="text-gray-600 mr-3"
56
56
  />
57
57
  <div>
58
- <div className="font-medium text-[#4a4f54]">
58
+ <div className="font-medium text-gray-900">
59
59
  {texts.savedCardsText}
60
60
  </div>
61
- <div className="text-sm text-[#c9c9c9]">
61
+ <div className="text-sm text-gray-500">
62
62
  {texts.savedCardsDescription.replace(
63
63
  '{count}',
64
64
  cards.length.toString()
@@ -70,7 +70,7 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
70
70
  )}
71
71
 
72
72
  <div
73
- className="flex items-center p-4 border border-[#eeeeee] hover:border-[#000000] transition-colors cursor-pointer"
73
+ className="flex items-center p-4 border border-gray-200 hover:border-primary transition-colors cursor-pointer"
74
74
  onClick={() => onMethodChange('new_card')}
75
75
  >
76
76
  <div
@@ -78,22 +78,22 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
78
78
  w-4 h-4 border-2 rounded-full flex items-center justify-center mr-3
79
79
  ${
80
80
  selectedMethod === 'new_card'
81
- ? 'border-[#000000] bg-[#000000]'
82
- : 'border-[#ebebeb]'
81
+ ? 'border-primary bg-primary'
82
+ : 'border-gray-300'
83
83
  }
84
84
  `}
85
85
  >
86
86
  {selectedMethod === 'new_card' && (
87
- <div className="w-2 h-2 bg-[#ffffff] rounded-full"></div>
87
+ <div className="w-2 h-2 bg-white rounded-full"></div>
88
88
  )}
89
89
  </div>
90
90
  <div className="flex items-center">
91
- <Icon name="plus" size={20} className="text-[#9d9d9d] mr-3" />
91
+ <Icon name="plus" size={20} className="text-gray-600 mr-3" />
92
92
  <div>
93
- <div className="font-medium text-[#4a4f54]">
93
+ <div className="font-medium text-gray-900">
94
94
  {texts.newCardText}
95
95
  </div>
96
- <div className="text-sm text-[#c9c9c9]">
96
+ <div className="text-sm text-gray-500">
97
97
  {texts.newCardDescription}
98
98
  </div>
99
99
  </div>
@@ -102,12 +102,12 @@ const PaymentMethodSelector: React.FC<PaymentMethodSelectorProps> = ({
102
102
  </div>
103
103
 
104
104
  {!hasStoredCards && (
105
- <div className="flex items-center justify-center p-8 text-[#c9c9c9]">
105
+ <div className="flex items-center justify-center p-8 text-gray-500">
106
106
  <div className="text-center">
107
107
  <Icon
108
108
  name="credit-card"
109
109
  size={24}
110
- className="mx-auto mb-2 text-[#d7d7d7]"
110
+ className="mx-auto mb-2 text-gray-400"
111
111
  />
112
112
  <p className="text-sm">{texts.noPaymentMethodsText}</p>
113
113
  </div>
@@ -126,10 +126,7 @@ export const useMasterpassAccount = () => {
126
126
  dispatch(resetState());
127
127
  }, [dispatch]);
128
128
 
129
- const refreshToken = async (options?: {
130
- three_d?: boolean;
131
- skipReset?: boolean;
132
- }) => {
129
+ const refreshToken = async (options?: { three_d?: boolean; skipReset?: boolean }) => {
133
130
  if (options?.three_d !== false && !options?.skipReset) {
134
131
  resetData();
135
132
  }
@@ -221,12 +218,8 @@ export const useMasterpassAccount = () => {
221
218
  informationModalData: {
222
219
  type: 'warning',
223
220
  title: texts?.sessionExpiredTitle || 'Session Expired',
224
- message:
225
- texts?.sessionExpiredMessage ||
226
- 'Your session has expired due to inactivity. Please restart the process to continue.',
227
- secondaryMessage:
228
- texts?.sessionExpiredSecondaryMessage ||
229
- 'For security reasons, verification codes are only valid for a limited time.',
221
+ message: texts?.sessionExpiredMessage || 'Your session has expired due to inactivity. Please restart the process to continue.',
222
+ secondaryMessage: texts?.sessionExpiredSecondaryMessage || 'For security reasons, verification codes are only valid for a limited time.',
230
223
  buttonText: texts?.sessionExpiredButton || 'Start Again'
231
224
  }
232
225
  })
@@ -366,8 +359,8 @@ export const useMasterpassAccount = () => {
366
359
  cvv: finalCardData.cvv,
367
360
  accountAliasName: finalCardData.cardAlias,
368
361
  userId: activeTokenData.UserId,
369
- isMsisdnValidatedByMerchant:
370
- activeTokenData.IsMsisdnValidated === 'True'
362
+ isMsisdnValidatedByMerchant: activeTokenData.IsMsisdnValidated === 'True',
363
+ authenticationMethod: activeTokenData.AuthenticationMethod
371
364
  });
372
365
 
373
366
  const result = await handleMasterpassResponse(response);
@@ -414,6 +407,7 @@ export const useMasterpassAccount = () => {
414
407
  [
415
408
  tokenData?.AccountKey,
416
409
  tokenData?.UserId,
410
+ tokenData?.AuthenticationMethod,
417
411
  newCardFormData,
418
412
  refreshAccountData,
419
413
  refreshToken,
@@ -138,6 +138,7 @@ export interface AddCardRequest {
138
138
  accountAliasName: string;
139
139
  userId: string;
140
140
  isMsisdnValidatedByMerchant: boolean;
141
+ authenticationMethod: string;
141
142
  }
142
143
 
143
144
  export interface AddCard3DSecureResult {