Download the PHP package wasksofts-technology/mpesa_v2 without Composer

On this page you can find all versions of the php package wasksofts-technology/mpesa_v2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mpesa_v2

Introduction

Mpesa PHP library which you can use with various framework like laravel ,codeigniter ,cakephp and many more This package seeks to help php developers implement the various Mpesa APIs without much hustle. It is based on the REST API whose documentation is available on https://developer.safaricom.co.ke.

Installation using composer

Quick start

Configuration

Set configuration values using config($key, $value).

Key Description
consumer_key Daraja app consumer key
consumer_secret Daraja app consumer secret
transaction_type paybill or buygoods
shortcode Paybill /Business shortcode
store_number Till number (for Buy Goods)
b2c_shortcode B2C shortcode
b2b_shortcode B2B shortcode
initiator_name API initiator username
initiator_password API initiator password
pass_key Lipa na M-Pesa passkey
security_credential Pre-generated security credential (optional)
callback_url STK Push callback URL base
so_callback_url Standing Order callback URL
confirmation_url C2B confirmation URL
validation_url C2B validation URL
result_url Base URL for result callbacks
timeout_url Base URL for timeout callbacks

official_contact Bill Manager official contact logo_link Bill Manager logo URL env sandbox or production

Register URL

Registers validation and confirmation URLs for a shortcode. Cancelled/Completed

STK Push (Lipa na M-Pesa Online)

STKPush($Amount, $phoneNumberSendingFund, $AccountReference, $TransactionDesc) Initiates an STK push to a customer's phone.

STKPush Status

Checks the status of an STK Push transaction.

B2C (Business to Customer)

$mpesa->b2c($amount, $commandId, $receiver, $remark, $result_url = 'b2c', $timeout_url = 'b2c', $occassion = null)

Sends money from business to customer.

B2B (Business to Business)

Transfers funds between businesses. $mpesa->b2b($Amount, $PartyB, $commandId, $AccountReference, $Remarks, $result_url = 'b2b', $timeout_url = 'b2b')

Transaction Reversal

Reverses a B2B, B2C, or C2B transaction. $mpesa->reversal($Amount, $TransactionID, $Remarks, $result_url = 'reversal', $timeout_url = 'reversal', $Occasion = NULL)

Account Balance

Queries the account balance of a shortcode. Identifier Types: 1 (MSISDN), 2 (Till Number), 4 (Shortcode) $mpesa->accountbalance(4, 'Balance query');

Transaction Status

Checks the status of any transaction. Identifier Types: 1 (MSISDN), 2 (Till Number), 4 (Shortcode) $mpesa->transaction_status($TransactionID, $Remarks, $indentifier = 4, $result_url = "transaction_status", $timeout_url = "transaction_status", $Occassion = NULL)

QR Code Generation

Generates a dynamic M-Pesa QR code. Formats: 1 (Image), 2 (QR String), 3 (Binary), 4 (PDF) $mpesa->generate_qrcode($amount, $reference, $MerchantName = 'SERVICE', $qrformat = 1, $trxcode = 'PG')

Tax Remittance

Remits tax to Kenya Revenue Authority (KRA). $mpesa->tax_remittance($amount, $account_prn, $Remarks = "OK", $result_url = 'tax', $timeout_url = 'tax', $kra_paybill = "572572")

Standing Orders

Creates a recurring standing order on a customer profile. $mpesa->standing_order($name, $start_date, $end_date, $amount, $from, $AccountReference, $TransactionDesc, $Frequency) Frequency: 1 One-off, 2 Daily, 3 Weekly, 4 Monthly, 5 Bi-Monthly, 6 Quarterly, 7 Half Year, 8 Yearly

Bill Manager

optin_biller($email, $reminders = 1)

Opts a business into Bill Manager.

optin_update($email, $reminders = 1)

Updates Bill Manager onboarding details. php

single_invoice($reference, $billedfullname, $billedphoneNumber, $billedperiod, $invoiceName, $dueDate, $accountRef, $amount)

Creates and sends a single e-invoice.

bulk_invoicing($invoiceArray)

Creates and sends multiple invoices at once. `

$mpesa->reconciliation($payment_date, $paidAmmount, $actReference, $transactionId, $phoneNumber, $fullName, $invoiceName, $reference)

Reconciles a payment against an invoice.

$mpesa->update_invoice_data($payment_date, $paidAmmount, $actReference, $transactionId, $phoneNumber, $fullName, $invoiceName, $reference)

Updates existing invoice data.

$mpesa->cancel_single_invoice($reference)

Cancels a single invoice using its external reference.


All versions of mpesa_v2 with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wasksofts-technology/mpesa_v2 contains the following files

Loading the files please wait ...