I was tasked to retrieve the code that Stripe generate when an user register his account using our app id.
this process is documented here:
https://stripe.com/docs/connect/collect-then-transfer-guide#web
Step 2.2
The documentation says that the Stripes redirects to a page:
Stripe might redirect to https://www.example.com/connect/oauth?state=s_987654321&code=ac_123456789
.
I need the ‘code’ parameter, but on the Webview, I haven seen that redirection, I have been log when the url changes or
the onloading changes, but this always enter on the default status and prints: "page undefined loading status"
is there a way to catch the redirections ?
WebView {
id:webView
width: parent.width
height: parent.height - headerSpacer.height
anchors.top: headerSpacer.bottom
anchors.horizontalCenter: parent.horizontalCenter
onUrlChanged: console.debug( url )
onLoadingChanged:{
console.debug("loading changed;" + loadRequest.url)
switch(loadRequest.status){
case WebView.LoadStartedStatus:
console.debug(" The page is currently loading. " )
break;
case WebView.LoadSucceededStatus:
console.debug("The page was loaded successfully.")
break;
case WebView.LoadFailedStatus:
console.debug("page failed.")
console.error( errorString )
break;
default:
console.debug("page undefined loading status")
break;
}
}
}
Component.onCompleted: {
webView.url = properties.mStripeConnect.replace("{STRIPE_CONNECT_APP_ID}", properties.mSTRIPE_CONNECT_APP_ID)
}