edlugz/sasapay

This package provides you with a simple tool to make requests to Sasapay APIs so that you can focus on the development of your awesome applications instead of all the set up involved.


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

composer require edlugz/sasapay

Publish Configuration File

php artisan vendor:publish --provider="EdLugz\SasaPay\SasaPayServiceProvider" --tag="migrations"

Fill in all the details you will be requiring for your application. Here are the env variables for quick copy paste.

SASAPAY_PERSONAL_ONBOARDING_RESULT_URL
SASAPAY_BUSINESS_ONBOARDING_RESULT_URL
SASAPAY_FUNDING_RESULT_URL
SASAPAY_SEND_MONEY_RESULT_URL
SASAPAY_BUSINESS_PAYMENT_RESULT_URL
SASAPAY_UTILITY_PAYMENT_RESULT_URL
SASAPAY_CLIENT_ID
SASAPAY_CLIENT_SECRET
SASAPAY_MERCHANT_CODE
SASAPAY_BASE_URL=

Usage

Using the facade

Onboarding - Personal

SasaPay::personalOnboarding()->signUp($firstName, $middleName = '', $lastName, $email, $countryCode, $mobileNumber, $documentNumber, $documentType);
SasaPay::personalOnboarding()->confirm($id, $otp);
SasaPay::personalOnboarding()->kyc($customerMobileNumber, $passportSizePhoto, $documentImageFront, $documentImageBackdocumentImageBack);

Onboarding - Business

SasaPay::businessOnboarding()->signUp($firstName, $middleName, $lastName, $countryCode, $mobileNumber, $documentNumber, $documentType, $documentType);
SasaPay::businessOnboarding()->confirm($id, $otp);
SasaPay::businessOnboarding()->kyc($requestId, $businessKraPin, $businessRegistrationCertificate, $directorIdCardFront, $directorIdCardBack, $directorKraPin);

Customers

SasaPay::customer()->getCustomers();
SasaPay::customer()->customerDetails($accountNumber);

Fund Account - send stk push to mobile number

SasaPay::fund()->fundRequest($networkCode, $mobileNumber, $receiverAccountNumber, $amount, $transactionDesc);
SasaPay::fund()->processRequest($receiverAccountNumber, $checkoutRequestId, $verificationCode);
SasaPay::fund()->fundingResult($data);

Send Money - to mobile wallets

SasaPay::sendMoney()->sendToMObile($transactionDesc, $senderNumber, $amount, $reason, $networkCode, $receiverNumber, $transactionReference);
SasaPay::sendMoney()->sendMoneyResult($data);

Send Money - to bank accounts

SasaPay::sendMoney()->sendToBank($transactionDesc, $senderNumber, $amount, $reason, $bankCode, $accountNumber, $transactionReference);
SasaPay::sendMoney()->sendMoneyResult($data);

Lipa - to paybills and till numbers

SasaPay::businessPayment()->lipa($amount, $senderAccountNumber, $receiverMerchantCode, $accountReference, $transactionFee = 0, $billerType, $networkCode, $reason);
SasaPay::businessPayment()->businessPaymentResult($data);

Utility - for airtime, nairobi water, dstv, gotv

SasaPay::utility()->payUtility($amount, $payerAccountNumber, $accountNumber, $transactionFee = 0);
SasaPay::utility()->billQuery($serviceCode, $customerMobile, $accountNumber);
SasaPay::utility()->utilityResult($data);

Statement - fetch transaction statement

SasaPay::statement()->fetch($accountNumber);

Transaction - verify and check status

SasaPay::transaction()->check($checkoutRequestId, $merchantTransactionReference, $transactionCode);
SasaPay::transaction()->verify($transactionCode);

Balance - check merchant balance

SasaPay::balance()->check($accountNumber);

Supplementary functions - channel codes, countries, sub-regions, industries, sub-industries, business types, account product types, agent locations

SasaPay::supplementary()->channelCodes();
SasaPay::supplementary()->countries();
SasaPay::supplementary()->subRegions();
SasaPay::supplementary()->industries();
SasaPay::supplementary()->subIndustries();
SasaPay::supplementary()->businessTypes();
SasaPay::supplementary()->accountProductTypes();
SasaPay::supplementary()->agentLocations();

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email eddy.lugaye@gmail.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.