Skip to content

Commit

Permalink
Updated the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
justinelut committed Jul 15, 2023
1 parent 91853e6 commit d315793
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-guests-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mpesapay": patch
---

Updated the Readme
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mpesa Pay is a JavaScript library that enables developers to easily integrate Mp

## Installation

You can install Mpesa Pay using Yarn or NPM.
You can install Mpesa Pay using Yarn, NPM & PNPM.

**Yarn**

Expand Down Expand Up @@ -57,7 +57,7 @@ const Account_Reference = 'YOUR_ACCOUNT_REFERENCE';
const PartyA = "YOUR_MPESA_PARTYA"
const B2C_Security_Credential = "YOUR MPESA B2C SECURITY CREDENTIAL"
const Initiator_Name = "YOUR MPESA INITIATORS NAME"
const Environment = 'sandbox | live'
const Environment = 'sandbox'



Expand Down
5 changes: 3 additions & 2 deletions src/helpers/FormatPaymentData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default function FormatPaymentData(data: Data): PaymentResult {
const paymentinfo = extractData(data);
return {
status: 'success',
message: 'Transaction processed succesfully',
data: {
Amount: paymentinfo.Amount,
MpesaReceiptNumber: paymentinfo.MpesaReceiptNumber,
Expand All @@ -59,13 +60,13 @@ export default function FormatPaymentData(data: Data): PaymentResult {
if (data && resultscode === 17) {
return {
status: 'failed',
message: 'Unable to process',
message: 'Unable to process the transaction',
resultCode: resultscode,
};
} else {
return {
status: 'canceled',
message: 'Canceled transaction',
message: 'Transaction was cancelled by the user',
resultCode: resultscode,
};
}
Expand Down

0 comments on commit d315793

Please sign in to comment.