On the clientside, how do I listen for external changes on the server?

On the clientside, how do I listen for external changes on the server?

I'm certain this has been asked before so I'm ready for a torrent of downvotes, but I just can't find anything. I don't know if my problem is specific to my situation or there is a general-purpose solution.

I'm certain this has been asked before so I'm ready for a torrent of downvotes, but I just can't find anything. I don't know if my problem is specific to my situation or there is a general-purpose solution.

Basic Outline

I'm setting up a payment process using Wechat QR codes on my website. The user scans the QR code and completes payment via Wechat Pay on their phone.

This means the user physically completes the process on a different platform, completely away from the website.

After completing the payment, the wechat app sends data to the given callback URL (e.g. www.mywebsite.com/Finance/PaymentFinished), where details can be taken from the request headers in the callback.

Via this callback, the server can be updated correctly, thus the payment process is completed and marked on the database.

Problem

My question is, how can I tell the website to keep a connection open and listen for that payment update?

Solution

Is there a specific way to do this, or should I just write some Javascript that repetitively calls the server (via something like www.mywebsite/com/Finance/CheckPaymentComplete?userID=1&productID=123) until it sees a change, and times out if it has to wait too long?

Thanks.

c-sharp ajax asp.net

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire ASP.Net Developers

Looking to outsource your asp dot net development requirement? ASP.Net is a special feature of the DOT Net framework created by Microsoft. At [HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io"), we have a team of experienced...

Various ways of redirecting a request in Asp.Net Core

ASP.NET Core web applications often need to redirect a request to another resource based on some condition. There are multiple ways in which you can accomplish this task in ASP.NET Core MVC and Razor …

Routing in MVC - ASP.NET Core Demystified

ASP.NET Core MVC has introduced quite a few concepts that new (or new-to-ASP.NET) web developers might have some difficulty getting caught up with. My ASP.NET Core Demystified series is designed to help these developers get started building their own custom, full-fledged, working AASP.NET Core applications. In

What is the ASP.Net Machine Account on my Computer?

Some users have reported the existence of the ASP.Net machine account. In this article, I will discuss what is asp.net machine account in windows 10/7 and how to disable it, asp.net machine account password, and can I delete asp.net machine account? .NET Framework is an application on Windows that requires the installation to run several apps or games. However, when the .NET Framework is downloaded and installed, the application automatically creates an ASP NET machine account.

ASP.NET MVC Application with JQuery, AJAX

Let's have a sample example: We have a submit button in our JQuery AJAX MVC application. Let's try to show a message when it is clicked. ASP.NET MVC Application - Using JQuery, AJAX