Search code examples
webview2squaresquare-checkout

Square Checkout URL - what response is returned & in which format when Payment succussed?


I am trying to get response when payment successes from checkout URL at my C# WPF application at WEBVIEW2 control. no any response or event triggered when success message displayed after payment successful.


Solution

  • If Square stays on the same HTML document when reporting a successful payment, there won't be any navigation events raised by WebView2. But if Square is using fetch or something similar to communicate with its server, you might be able to see progress on a payment by watching the CoreWebView2.WebResourceResponseReceived event to see what web responses the script in the page is getting. This is obviously a fragile solution that could break if Square changes how it performs payments.