Forums

OverviewFelgo 2 Support (Qt 5) › Help with webview and retrieve a parameter

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23635

    jrrobles79

    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)
        }

     

     

     

     

     

    #23636

    jrrobles79

    UPDATE

    Im. clossing this issue since looks the problem is on the url not the webview compoent

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.