-
Notifications
You must be signed in to change notification settings - Fork 7
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
「支払い時」「顧客カードに対する3Dセキュア」に対応 #95
base: master
Are you sure you want to change the base?
Conversation
- Introduce new method `startThreeDSecureProcess(viewController:delegate:resourceId:)` in ThreeDSecureProcessHandler - Add `makeTdsEntryUrl(resourceId:)` method to ThreeDSecureURLConfiguration - Mark previous token-based method as deprecated - Update tests to support new resource ID-based 3D Secure process
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.
ありがとうございます。2点コメントしました。
@@ -46,19 +51,33 @@ class ThreeDSecureProcessHandlerTests: XCTestCase { | |||
XCTAssertEqual(mockDriver.openWebBrowserUrl?.absoluteString, token.tdsEntryUrl.absoluteString) |
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.
例えばですが、Token.tdsEntryUrl
を利用している箇所は追加いただいた PAYJPSDK.threeDSecureURLConfiguration?.makeTdsEntryUrl
で代替可能に見えますがどうでしょうか?
Token 側の extension を消す( public ではないので非推奨ではなく削除する)とロジックを集約できるメリットがあると思いました。
@@ -19,4 +19,15 @@ public class ThreeDSecureURLConfiguration: NSObject { | |||
self.redirectURL = redirectURL | |||
self.redirectURLKey = redirectURLKey | |||
} | |||
|
|||
public func makeTdsEntryUrl(resourceId: String) -> URL { |
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.
public な関数であれば略語より ThreeDSecure
を使うとよりベターです。
makeThreeDSecureEntryURL(resouceId: String)
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も用意できると嬉しいなーって気がしてます
public func startThreeDSecureProcess(viewController: UIViewController, | ||
delegate: ThreeDSecureProcessHandlerDelegate, | ||
token: Token) { | ||
self.delegate = delegate | ||
webDriver.openWebBrowser(host: viewController, url: token.tdsEntryUrl, delegate: self) | ||
} | ||
|
||
public func startThreeDSecureProcess(viewController: UIViewController, |
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.
@objc
つけないとobjective-c側で呼び出せなそうですかね。
ThreeDSecureProcessHandlerDelegateにもつけないとダメそうです。
- Remove `tdsEntryUrl` method from Token model - Update ThreeDSecureProcessHandler to use new URL configuration method - Modify test to use new URL generation approach
- Rename `makeTdsEntryUrl` to `makeThreeDSecureEntryURL` in ThreeDSecureURLConfiguration - Update method calls in ThreeDSecureProcessHandler and tests - Improve method naming for better readability
ef79211
to
319563c
Compare
- Add Objective-C compatibility annotations to ThreeDSecureProcessHandler - Update example Objective-C app to handle 3D Secure verification flow - Implement 3D Secure delegate methods in CardFormViewScrollViewController - Add pending token handling for 3D Secure verification
既存のstartThreeDSecureProcessメソッドはトークン作成時の3Dセキュア認証のみを受け付けており、「支払い時」「顧客カードに対する3Dセキュア」に対応できていないため以下の新しいメソッドを追加します。