Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MpesaHelper.php #15

Closed
wants to merge 1 commit into from
Closed

Update MpesaHelper.php #15

wants to merge 1 commit into from

Conversation

steveyout
Copy link

No description provided.

@Iankumu
Copy link
Owner

Iankumu commented May 17, 2024

I am not able to reproduce the issue raised in this pr . Also this pr introduces breaking changes.
The best option would be to call $response->json() from your side rather than introduce it within the package and explicitly format the response to be returned as an associative array.

Example

use Iankumu\Mpesa\Facades\Mpesa;
$response=Mpesa::stkpush($phonenumber, $amount, $account_number,$callbackurl = null);

 /** @var \Illuminate\Http\Client\Response $response */
$result = $response->json(); // provides the json decoded data as an associative array
return $result;

@Iankumu Iankumu closed this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants