@akinon/pz-saved-card 1.101.0-rc.75 → 1.101.0-rc.76
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
package/package.json
CHANGED
|
@@ -181,7 +181,6 @@ const IyzicoSavedCardOption = ({
|
|
|
181
181
|
const [months, setMonths] = useState([]);
|
|
182
182
|
const [years, setYears] = useState([]);
|
|
183
183
|
const [formError, setFormError] = useState(null);
|
|
184
|
-
const [showCardForm, setShowCardForm] = useState(true);
|
|
185
184
|
|
|
186
185
|
const getFormSchema = () => {
|
|
187
186
|
if (customFormSchema?.[type]) {
|
|
@@ -305,33 +304,16 @@ const IyzicoSavedCardOption = ({
|
|
|
305
304
|
setType('new-card');
|
|
306
305
|
}
|
|
307
306
|
|
|
308
|
-
const checkInterval = setInterval(() => {
|
|
309
|
-
if (window.iyziUcsInit?.scriptType === 'CONSUMER_WITH_CARD_EXIST') {
|
|
310
|
-
if (
|
|
311
|
-
!window.universalCardStorage?.consumerToken ||
|
|
312
|
-
window.universalCardStorage?.cardToken
|
|
313
|
-
) {
|
|
314
|
-
setType('existing-card');
|
|
315
|
-
} else {
|
|
316
|
-
setType('new-card');
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}, 500);
|
|
320
|
-
|
|
321
|
-
return () => clearInterval(checkInterval);
|
|
322
|
-
}, [type]);
|
|
323
|
-
|
|
324
|
-
useEffect(() => {
|
|
325
307
|
const checkboxInterval = setInterval(() => {
|
|
326
308
|
if (window.universalCardStorage?.cardToken !== undefined) {
|
|
327
|
-
|
|
309
|
+
setType('existing-card');
|
|
328
310
|
} else {
|
|
329
|
-
|
|
311
|
+
setType('new-card');
|
|
330
312
|
}
|
|
331
313
|
}, 100);
|
|
332
314
|
|
|
333
315
|
return () => clearInterval(checkboxInterval);
|
|
334
|
-
}, [type
|
|
316
|
+
}, [type]);
|
|
335
317
|
|
|
336
318
|
return (
|
|
337
319
|
<>
|
|
@@ -369,7 +351,7 @@ const IyzicoSavedCardOption = ({
|
|
|
369
351
|
</>
|
|
370
352
|
)}
|
|
371
353
|
|
|
372
|
-
{
|
|
354
|
+
{type === 'new-card' && (
|
|
373
355
|
<>
|
|
374
356
|
{customRender?.cardFormSection ? (
|
|
375
357
|
customRender.cardFormSection({
|