![]() |
|
How Intraweb server handler webhook from payment gateway - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: How Intraweb server handler webhook from payment gateway (/thread-3680.html) |
How Intraweb server handler webhook from payment gateway - baxing - 12-05-2023 Hello, I neet to use IntraWeb Web Application to support customer payments through the website. By use the Payment Gateway service by connecting via API(JSON) which has a sequence diagram as shown in the picture. ![]() There will be 2 steps where the Payment Gateway will respond to create payment (charge.create) and finalize payment (charge.complete) with a Webhook (with POST requests) to the Server (from the picture that has been highlighted in yellow color). 1. I would like to know how to make this WebApp Server developed with IntraWeb able to accept this Webhook. The Webhook must be set up on the Payment Gateway side, such as url path of my site https://mydomain.com/handlerwebhook. 2. And if we assume that the payment has arrived chage.complete This will be a success or a failure. Now in the Client Browser, the customer may or may not close the Browser tab. which if it is not closed yet. How can I send the payment status to that client?(Server send communicate to specific client) For example, it may show a message box that the payment has been completed or the payment failed due to... Thank you RE: How Intraweb server handler webhook from payment gateway - ioan - 12-07-2023 I think you should take a look at ContentHandlers in the Intraweb demos: https://github.com/Atozed/IntraWeb/tree/master/15/Delphi/ContentHandlers RE: How Intraweb server handler webhook from payment gateway - baxing - 12-08-2023 Thank you iaon for the suggestion and sample link. ์Now. Quote:1. I would like to know how to make this WebApp Server developed with IntraWeb able to accept this Webhook. The Webhook must be set up on the Payment Gateway side, such as url path of my site https://mydomain.com/handlerwebhook. I got the idea from the link you gave and I found 2 other very useful examples that I can apply to my case as well: - PostDataDemo - DynContentHandler ---------------------- ฺBut in this case --> Quote:2. And if we assume that the payment has arrived chage.complete This will be a success or a failure. Now in the Client Browser, the customer may or may not close the Browser tab. which if it is not closed yet. How can I send the payment status to that client?(Server send communicate to specific client) For example, it may show a message box that the payment has been completed or the payment failed due to... Let me explain for example. The customer is on the payment page and presses the payment button, such as using a credit card or scanning the QRCode shown on the payment page. But. How can I notify back(and some data) to Cleint (Web broswer) if the server side has already received the customer's payment results via Webhook? Is there any way to do it where the server side initiates the sending first and goes to the right client(session) as well? Thanks RE: How Intraweb server handler webhook from payment gateway - baxing - 12-08-2023 For Quote:2. And if we assume that the payment has arrived chage.complete This will be a success or a failure. Now in the Client Browser, the customer may or may not close the Browser tab. which if it is not closed yet. How can I send the payment status to that client?(Server send communicate to specific client) For example, it may show a message box that the payment has been completed or the payment failed due to... I found the guidelines that I expected to adapt here from the example. - IWMonitor_SendMessage - IWMonitor-SessionNotification But from what Alexandre explained in this forum thread : thread-1890-post-6574 So I thought that, I just might have to adjust for sending to boardcase sessions, but send a specified session instead. Code: gSessions.Execute( 'IWAppID',by - 'IWAppID' is AppID of session which to notify - variable 'yourvaronusersession' is declare in UsersessionUnit If I don't understand correctly or have a better way, please help advise me. Thanks RE: How Intraweb server handler webhook from payment gateway - Alexandre Machado - 02-07-2025 Check out this new demo that shows the whole process (including a demo payment server built with Delphi/Indy) :-) https://github.com/Atozed/IntraWeb/tree/master/15/Delphi/WebHook |