Closed himanshupatel95 closed 5 years ago
Hi @himanshupatel95. What were you trying to achieve when you encountered this? Have you defined your environmental variables? If not you need to define them.
Encountered the same issue as well.
The code:
$stkPushSimulation = $mpesa->STKPushSimulation(
"174379",
"bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919",
"CustomerPayBillOnline",
"10",
"254720123123",
"174379",
"254720123123",
"https://example.com/callback.php",
"Abc 123",
"Testing Mpesa API",
"MPesa API");
echo $mpesa->getDataFromCallback();```
Hey @KipchirchirIan Currently the sdk works well with Laravel. The env function works well with PHP. Just realized This. I will make provisions so that It can work with all the other frameworks soon
Fatal error: Call to undefined function Safaricom\Mpesa\env() in env() error.