Open
Conversation
Contributor
natsuki-yamanaka
left a comment
There was a problem hiding this comment.
コメント追加するかもしれませんが、ざっくり全体見ました
example/app/(tabs)/tds/finish.tsx
Outdated
| const router = useRouter(); | ||
|
|
||
| const handleReturn = () => { | ||
| router.replace('/tds'); |
Contributor
There was a problem hiding this comment.
遷移的に違和感があったので、トップに戻るといいかと思いました
Suggested change
| router.replace('/tds'); | |
| router.replace('/'); |
| export const startThreeDSecureProcess = async ( | ||
| resourceId: string, | ||
| onSucceeded: OnThreeDSecureProcessSucceeded, | ||
| onFailed: OnThreeDSecureProcessFailed, |
Contributor
There was a problem hiding this comment.
今3DS中にバツボタンで閉じた時にもここにきますよね?
キャンセルはFailedという括りの処理とはちょっと違うイメージです。
iOSだとThreeDSecureProcessStatusが返ってくるので、onSucceededにそういうのを渡してそれ以外の不明なエラーはonFailed、とかでも良さそうです。
https://github.com/payjp/payjp-ios/blob/d4e228ba0bfc6dd82b216342a57c03059043ace7/Sources/ThreeDSecure/ThreeDSecureProcessHandler.swift#L12
Contributor
Author
There was a problem hiding this comment.
onSucceededにThreeDSecureProcessStatusを含めるようにしました
| } catch (nativeError: any) { | ||
| const errorMessage = `Native Code: ${nativeError.code}, Message: ${nativeError.message || 'Unknown error'}`; | ||
| const errorPayload = { message: errorMessage, code: 1 }; | ||
| onFailed(errorPayload); |
Contributor
There was a problem hiding this comment.
ここはonFailedとthrowとどっちも呼ばれるのは微妙そうな気がしていて…どっちかでいいんじゃないですかね?
Contributor
Author
There was a problem hiding this comment.
途中で設計変更したので throw nativeError; が残ってしまったようです、消します。。
natsuki-yamanaka
approved these changes
May 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
「支払い作成時の 3Dセキュア」「顧客カードに対する 3Dセキュア」に対応するための変更です。
0.8.6 → 0.9.0 へバージョン番号を更新します。
変更点
startThreeDSecureProcess(resourceId: String, promise: Promise)を追加