Skip to content

Commit 0c57a4d

Browse files
authored
Merge pull request #6 from Ghostscypher/dev
Fix: update documentation
2 parents 260c806 + 326c538 commit 0c57a4d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/B2B/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Mpesa Utility APIs
2+
title: Mpesa B2B APIs
33
weight: 1
44
---
55

@@ -60,7 +60,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
6060
*/
6161
$response = Mpesa::B2B('600000', '1', 'Test');
6262

63-
if($response->getStatusCode() == 200) {
63+
if($response->successful()) {
6464
// Success
6565
$response = $response->json();
6666
} else {
@@ -98,7 +98,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
9898
*/
9999
$response = Mpesa::B2BRemitTax('1', 'Test');
100100

101-
if($response->getStatusCode() == 200) {
101+
if($response->successful()) {
102102
// Success
103103
$response = $response->json();
104104
} else {
@@ -130,7 +130,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
130130
*/
131131
$response = Mpesa::B2BStkPush('600000', '1', 'Test');
132132

133-
if($response->getStatusCode() == 200) {
133+
if($response->successful()) {
134134
// Success
135135
$response = $response->json();
136136
} else {

docs/C2B/mratiba.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
5454
*/
5555
$response = Mpesa::ratiba('Lipa Mdogo Mdogo', '254712345678', '1', '20221201', '20231201', '3', 'July Payment');
5656

57-
if($response->getStatusCode() == 200) {
57+
if($response->successful()) {
5858
// Success
5959
$response = $response->json();
6060
} else {

docs/C2B/stk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
4242
*/
4343
$response = Mpesa::stkPush('254712345678', '1', 'Test');
4444

45-
if($response->getStatusCode() == 200) {
45+
if($response->successful()) {
4646
// Success
4747
$response = $response->json();
4848
// $response = ['MerchantRequestID' => '12345', 'CheckoutRequestID' => '12345', 'ResponseCode' => '0', 'ResponseDescription' => 'Success. Request accepted for processing', 'CustomerMessage' => 'Success. Request accepted for processing']
@@ -72,7 +72,7 @@ use \Ghostscypher\Mpesa\Facades\Mpesa;
7272
*/
7373
$response = Mpesa::stkPushQuery('wco_123456789');
7474

75-
if($response->getStatusCode() == 200) {
75+
if($response->successful()) {
7676
// Success
7777
$response = $response->json();
7878
} else {

0 commit comments

Comments
 (0)