Hi, for a Shop Solution I need a Webhook Listener who updates a database when a payment has been completed ([login to view URL])
<?php
public IActionResult Webhook()
{
// The APIContext object can contain an optional override for the trusted certificate.
var apiContext = [login to view URL]();
// Get the received request's headers
var requestheaders = [login to view URL];
// Get the received request's body
var requestBody = [login to view URL];
using (var reader = new [login to view URL]([login to view URL]))
{
requestBody = [login to view URL]();
}
dynamic jsonBody = [login to view URL](requestBody);
string webhookId = [login to view URL];
var ev = [login to view URL](apiContext, webhookId);
// We have all the information the SDK needs, so perform the validation.
// Note: at least on Sandbox environment this returns false.
// var isValid = [login to view URL](apiContext, ToNameValueCollection(requestheaders), requestBody, webhookId);
switch (ev.event_type)
{
case "[login to view URL]":
$pdo = new PDO('mysql:host=localhost;dbname=xxxx', 'xxxxx', 'xxx', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$sql = $pdo->prepare("INSERT INTO wp_listening (info)
VALUES ('hat funktioniert')");
$sql->execute();
break;
case "[login to view URL]":
$pdo = new PDO('mysql:host=localhost;dbname=xxxx', 'xxxx', 'xxxx', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$sql = $pdo->prepare("INSERT INTO wp_listening (info)
VALUES (?)");
$sql->execute("hat nicht funktioniert");
break;
// Handle other webhooks
default:
break;
}
return new HttpStatusCodeResult(200);
}
?>
Greetings from Hexamaze Technologies!
We went through the project regarding your requirement. We understood the requirements and your expectations.
We are a Web and Mobile App development team from India and work worldwide.
❁ Our profile: [login to view URL]
❁ Technologies we are working: [login to view URL]
➦ We worked on many types of projects, I hope to discuss with you to make clear the requirements and point out the best method to develop the project.
➦ We can quickly deploy existing solutions that we have implemented for years at the most optimal cost.
We have our experienced team that ensures you to finish the project on time with excellent quality.
If you need additional information, please feel free to contact us. Thank you for your consideration.
Looking forward to hearing from you.
Thanks & Regards,
Hexamaze Technologies
€18 EUR in 1 day
5.0 (11 reviews)
2.9
2.9
5 freelancers are bidding on average €22 EUR for this job
⭐Dear client.⭐
I have read your project description carefully and I have understood clearly what you require.
I have more than 15 years of experience in website development and meanwhile, I have mastered payment integration.
If you allow me, I will put my energy and time into your project to satisfy you.
Let's discuss the project in detail.
Looking forward to hearing from you.
Best regards.