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.
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.8
- illuminate/support: ^10.0
Requires (Dev)
- orchestra/testbench: ^v8.15.0
- phpunit/phpunit: ^10.0
- dev-master
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- 1.0.0
- dev-analysis-LZOJ5n
- dev-analysis-b06PxY
- dev-analysis-Dyvemy
- dev-analysis-o7459K
- dev-analysis-6VY0an
- dev-analysis-N4YgvE
- dev-analysis-yrj6Dj
- dev-analysis-GPZKYk
- dev-analysis-wOZw52
- dev-analysis-VB92bK
- dev-analysis-KoQ2rA
- dev-analysis-o74mrQ
- dev-analysis-GPZJMk
- dev-analysis-AP5bnV
- dev-analysis-LZOMKG
- dev-analysis-6VY37n
- dev-analysis-YO5O50
This package is auto-updated.
Last update: 2024-10-17 10:14:58 UTC
README
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.