feat: add useCardForm() hook with tokenization and 3DS (ACC-6925)#346
feat: add useCardForm() hook with tokenization and 3DS (ACC-6925)#346OnurVar wants to merge 1 commit intoov/feat/ACC-6492from
Conversation
Generated by 🚫 Danger Swift against d6c9c11 |
Generated by 🚫 Danger Kotlin against d6c9c11 |
There was a problem hiding this comment.
4 issues found.
About Unblocked
Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.
📖 Documentation — Learn more in our docs.
💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions about your code.
👍 Give feedback — React to comments with 👍 or 👎 to help us improve.
⚙️ Customize — Adjust settings in your preferences.
|
Appetize Android link: https://appetize.io/app/iuefsgpuqgjtcbcbyy6tqrvybi |
|
Appetize iOS link: https://appetize.io/app/ky32djjab7giv4h7llx3bnjiwi |
69e4942 to
5b1aa88
Compare
9b3f3e8 to
95f2be8
Compare
5b1aa88 to
6e6e96f
Compare
2ad0a1c to
70bbf52
Compare
6e6e96f to
534cef6
Compare
70bbf52 to
bb0959a
Compare
534cef6 to
15c3bb8
Compare
| setIsInitialized(true); | ||
| } catch (err) { | ||
| if (!cancelled) { | ||
| console.error('[useRawDataManagerBridge] init failed:', err); |
There was a problem hiding this comment.
How confident are we that the sensitive card info cant be emitted here? Passing the whole error gives me pause, in case the err might contain the raw input there could be potential to leak the PAN/CVV?
234f02d to
d6c9c11
Compare
bb0959a to
a725da4
Compare
a725da4 to
0d27802
Compare
d6c9c11 to
b7b5a75
Compare
0d27802 to
2f412f5
Compare
83e7493 to
6cb3a53
Compare
3fb9961 to
71d1bf2
Compare
6cb3a53 to
b11b6e4
Compare
71d1bf2 to
13f4905
Compare
b11b6e4 to
2549108
Compare
2549108 to
3b5bc82
Compare
05e7ea6 to
3d72c17
Compare
…925) Backs the card form with a provider-managed raw-data lifecycle on PrimerCheckoutProvider (activeMethod, cardFormState, setRawData, submit, retry, clearPaymentOutcome, paymentOutcome, settings). The hook forwards field updates to the provider and surfaces validation state without owning the native manager, so the manager survives nav transitions.
3b5bc82 to
334668f
Compare
3d72c17 to
c42b7c5
Compare
Summary
useCardForm()hook that wraps RawDataManager to provide managed card form state, auto-formatting, touch-based validation, debounced native sync, BIN detection, and guarded submit for tokenization/3DSuseRawDataManagerBridgeinternal hook managing RawDataManager lifecycle, event subscription, and cleanupCardFormTypeswithUseCardFormOptions,UseCardFormReturn,CardFormErrors,CardFormFielddebounceutility insrc/utils/debounce.tsuseCardFormand types from package rootJira
ACC-6925
Test plan
npm run lint— cleannpm test— 32/32 tests passnpx tsc --noEmit— no TypeScript errors