-
Notifications
You must be signed in to change notification settings - Fork 0
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
PR-3766: Credit card support support #9
Conversation
312c979
to
8b4602f
Compare
@@ -84,28 +79,66 @@ extension CardPaymentHandler: WKNavigationDelegate { | |||
|
|||
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { | |||
print(navigationAction) | |||
if let body = navigationAction.request.httpBody { } | |||
if let url = navigationAction.request.mainDocumentURL?.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.
@lukasz-lenkiewicz ca we listen to messages from iframes for error and success?
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.
in order to support javascript, html response needs to be changed similiar way as its for reactnative:
try {
window.ReactNativeWebView.postMessage(
JSON.stringify({
type: '3DS-challenge-completed',
})
);
} catch (e) {}
and use something like:
try {
window.webkit.messageHandlers.payrails.postMessage(
JSON.stringify({
type: '3DS-challenge-completed',
})
);
} catch (e) {}
without above, iOS doesnt get the information, thats why atm it works with redirect url which is set by
window.setTimeout(() => {
window.location.href = 'https:\/\/www.bootstrap.payrails.io\/success';
}, 500);
Its a duplicate of #8 - but with renamed branch