@akinon/pz-masterpass-rest 1.123.0-rc.0 → 1.123.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
|
@@ -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,11 +222,11 @@ 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
|
-
|
|
233
|
-
|
|
225
|
+
<p className="text-xs text-gray-500 text-center">{getHelperText()}</p>
|
|
226
|
+
)}
|
|
227
|
+
{error && (
|
|
228
|
+
<p className="text-[#d72b01] text-xs text-center">{error}</p>
|
|
234
229
|
)}
|
|
235
|
-
{error && <p className="text-error text-xs text-center">{error}</p>}
|
|
236
230
|
<Button
|
|
237
231
|
className="py-3 h-auto"
|
|
238
232
|
onClick={handleSubmit}
|
|
@@ -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
|
-
|
|
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,7 @@ 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'
|
|
371
363
|
});
|
|
372
364
|
|
|
373
365
|
const result = await handleMasterpassResponse(response);
|