-
Notifications
You must be signed in to change notification settings - Fork 4
「支払い作成時の 3Dセキュア」「顧客カードに対する 3Dセキュア」に対応 #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
natsuki-yamanaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント追加するかもしれませんが、ざっくり全体見ました
example/app/(tabs)/tds/finish.tsx
Outdated
| const router = useRouter(); | ||
|
|
||
| const handleReturn = () => { | ||
| router.replace('/tds'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
遷移的に違和感があったので、トップに戻るといいかと思いました
| router.replace('/tds'); | |
| router.replace('/'); |
| export const startThreeDSecureProcess = async ( | ||
| resourceId: string, | ||
| onSucceeded: OnThreeDSecureProcessSucceeded, | ||
| onFailed: OnThreeDSecureProcessFailed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今3DS中にバツボタンで閉じた時にもここにきますよね?
キャンセルはFailedという括りの処理とはちょっと違うイメージです。
iOSだとThreeDSecureProcessStatusが返ってくるので、onSucceededにそういうのを渡してそれ以外の不明なエラーはonFailed、とかでも良さそうです。
https://github.com/payjp/payjp-ios/blob/d4e228ba0bfc6dd82b216342a57c03059043ace7/Sources/ThreeDSecure/ThreeDSecureProcessHandler.swift#L12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onSucceededにThreeDSecureProcessStatusを含めるようにしました
| } catch (nativeError: any) { | ||
| const errorMessage = `Native Code: ${nativeError.code}, Message: ${nativeError.message || 'Unknown error'}`; | ||
| const errorPayload = { message: errorMessage, code: 1 }; | ||
| onFailed(errorPayload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここはonFailedとthrowとどっちも呼ばれるのは微妙そうな気がしていて…どっちかでいいんじゃないですかね?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
途中で設計変更したので throw nativeError; が残ってしまったようです、消します。。
「支払い作成時の 3Dセキュア」「顧客カードに対する 3Dセキュア」に対応するための変更です。
0.8.6 → 0.9.0 へバージョン番号を更新します。
変更点
startThreeDSecureProcess(resourceId: String, promise: Promise)を追加