Skip to content

Instantly share code, notes, and snippets.

@DavidInnocent
Created May 16, 2020 17:05
Show Gist options
  • Save DavidInnocent/dbc7a2b3f1ec6178e7cff07d7dbdf5cc to your computer and use it in GitHub Desktop.
Save DavidInnocent/dbc7a2b3f1ec6178e7cff07d7dbdf5cc to your computer and use it in GitHub Desktop.
<?php
header("Content-Type:application/json");
if (!isset($_GET["token"]))
{
echo "Technical error";
exit();
}
if ($_GET["token"]!='hahahahaha')
{
echo "Invalid authorization";
exit();
}
/*
Accept an Mpesa transaction
by replying with the below code
*/
echo '{"ResultCode":0, "ResultDesc":"Success", "ThirdPartyTransID": 0}';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment