Skip to content

Conversation

@laiso
Copy link
Contributor

@laiso laiso commented May 11, 2025

「支払い作成時の 3Dセキュア」「顧客カードに対する 3Dセキュア」に対応するための変更です。
0.8.6 → 0.9.0 へバージョン番号を更新します。

変更点

開始画面 コールバック先
Simulator Screenshot - iPhone SE (3rd generation) - 2025-05-11 at 11 26 10 Simulator Screenshot - iPhone SE (3rd generation) - 2025-05-11 at 11 26 18

Copy link
Contributor

@natsuki-yamanaka natsuki-yamanaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント追加するかもしれませんが、ざっくり全体見ました

const router = useRouter();

const handleReturn = () => {
router.replace('/tds');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

遷移的に違和感があったので、トップに戻るといいかと思いました

Suggested change
router.replace('/tds');
router.replace('/');

export const startThreeDSecureProcess = async (
resourceId: string,
onSucceeded: OnThreeDSecureProcessSucceeded,
onFailed: OnThreeDSecureProcessFailed,
Copy link
Contributor

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

Copy link
Contributor Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはonFailedとthrowとどっちも呼ばれるのは微妙そうな気がしていて…どっちかでいいんじゃないですかね?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

途中で設計変更したので throw nativeError; が残ってしまったようです、消します。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants