Skip to content

【WIP】3DS2.0対応#51

Closed
jassan wants to merge 5 commits intot-k:masterfrom
jassan:feature/3DS2_0
Closed

【WIP】3DS2.0対応#51
jassan wants to merge 5 commits intot-k:masterfrom
jassan:feature/3DS2_0

Conversation

@jassan
Copy link
Contributor

@jassan jassan commented Feb 8, 2022

SSIA

Comment on lines +44 to +49
# Transform the redirect_url
# "ACS=2&RedirectUrl=https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702- ebba2f3373ee&t=dccc8a7ed85372c9accff576bff59b3a" => { "ACS" => "2", RedirectUrl => "https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702- ebba2f3373ee&t=dccc8a7ed85372c9accff576bff59b3a" }
if response['RedirectUrl'].present? && response['t'].present? && response.keys.index('RedirectUrl') + 1 == response.keys.index('t')
response['RedirectUrl'] = response['RedirectUrl'] + '&t=' + response['t']
response.delete('t')
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jiikko
3DS2.0の対応をさせていただいております。
specはToDoになりますが、実装方針が問題ないかを確認したいです。

レスポンスの中に &を含む値があり、そのまま使用すると &tが別のkeyと認識されてしまう問題がありましたので、上記のように手動でパースする実装を入れています。

上記の方法以外だと、idPass ではなく json でリクエストしなければならなくなりそうなのでもう少し大きな改修が必要になりそうです。
他のparse方法でも無理でした。

pry(main)> Rack::Utils.parse_nested_query("ACS=2&RedirectUrl=https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702-ebba2f3373ee&t=dccc8a7ed85372c9accff576bff59b3a")
=> {"ACS"=>"2", "RedirectUrl"=>"https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702-ebba2f3373ee", "t"=>"dccc8a7ed85372c9accff576bff59b3a"}

ご確認よろしくお願いいたします。

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jassan

返信が遅くなって申し訳ないです。

レスポンスの中に &を含む値があり、そのまま使用すると &tが別のkeyと認識されてしまう問題がありましたので、上記のように手動でパースする実装を入れています。

私は3DS2.0を使ったことがないので微妙なところですが、
テストを気持ち厚く書いて、動いているのであれば手動パースで問題ないと思います。


ドキュメントは公開されていないっぽいので頑張って手に入れてみます。

:register_disp_8 => "RegisterDisp8",
:reserve_no => "ReserveNo",
:ret_url => "RetURL",
:ret_url => "RetUrl",

Choose a reason for hiding this comment

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

要求されるパラメータが RetURLRetUrl の2種類混在してるようですね。
3Dセキュアの場合は後者でよさそうですが、他の決済手段の場合前者を要求されるケースがあるようです。

@eggplants
Copy link

2025年3月末にECサイトでの3DSの利用が義務化されるようです。
https://static.mul-pay.jp/doc/3ds/obligation/

@ryo22222
Copy link

ryo22222 commented Nov 29, 2024

@ichirosoft

本PRは引き続き開発中でしょうか?
自前で対応が必要か判断したく、予定の有無だけでもおしえていただけますと幸いです。

@ryo22222
Copy link

ryo22222 commented Nov 29, 2024

cc @jiikko @y-yagi @ken1flan

@jiikko
Copy link
Collaborator

jiikko commented Jul 29, 2025

続きは #76 でやっています!

@jiikko jiikko closed this Jul 29, 2025
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.

5 participants