0

Does someone know how to open a "WebView" inside a Flutter WebApp ? I need to parse the url of a webpage an return this result into mu Flutter Web App

below my code that open a new tab in the browser :

html.window.open('https://demo.vivapayments.com/web2?ref=$orderCode&lang=fr-BE',"_blank");

I'm Using VivaWallet Payment Solutions and I need to parse the URL after payment validation before sending the items in my database...

I need a solution for Friday night , please if someone has an idea ...

I also tried HTMLWIDGET :

enter image description here

but it doesn't work at all

LeGros
  • 19
  • 5

1 Answers1

0

If you want to open webview you can use fwfh_webview package. But what you want to achieve is use the $orderCode response and parse it to VivaWallet API Url.

just change this

html.window.open('https://demo.vivapayments.com/web2?ref=$orderCode&lang=fr-BE',"_blank");

to

html.window.open('https://demo.vivapayments.com/web2?ref=$orderCode&lang=fr-BE',"new tab");

It will open you a new tab for vivapayment where you do your transaction. wait on app screen to finish transaction. then you should create a transaction table/collection whether with its status whether it is successfull or not because you should keep record of failure transaction too. Rest you can do on the transaction status basis.

  • I need to parse the uri where there is the parameter named « k » that I have to check after having the order code, order code is just a order request – LeGros Oct 12 '22 at 16:10
  • I’ll try your solution but I need to keep access to the new tab url – LeGros Oct 12 '22 at 16:12
  • I don't see the difference between _blank and new tab... Despite I've test both of them.... – LeGros Oct 12 '22 at 22:02