Download the PHP package shubhamc4/cgrate-php without Composer
On this page you can find all versions of the php package shubhamc4/cgrate-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shubhamc4/cgrate-php
More information about shubhamc4/cgrate-php
Files in shubhamc4/cgrate-php
Package cgrate-php
Short Description Core PHP package for integrating with CGrate payment service (543 Konse Konse)
License MIT
Homepage https://github.com/shubhamc4/cgrate-php
Informations about the package cgrate-php
CGrate PHP Package
A Core PHP package for integrating with the CGrate payment service to process mobile money transactions in Zambia.
Table of Contents
- Introduction
- Requirements
- Installation
- Configuration
- Usage
- Check Account Balance
- Get Available Cash Deposit Issuers
- Process Customer Payment
- Query Customer Payment
- Process Cash Deposit
- Generate Transaction Reference
- Get Customer Account Issuer Name
- Data Transfer Objects
- Response Codes
- Changelog
- Credits
- License
Introduction
CGrate (543 Konse Konse) is a payment service provider based in Zambia that facilitates mobile money transactions. This Core PHP package allows businesses to:
- Process payments from mobile money accounts
- Check account balances in real-time
- Verify transaction status
- Reverse/refund payments when necessary
The service operates via a SOAP API that requires WS-Security authentication. CGrate is widely used for integrating with local payment systems in Zambia, making it easier for businesses to accept mobile payments from customers.
For more information about CGrate payment service, visit their official website or contact their support team at [email protected].
Official Documentation
For detailed information on the CGrate SOAP API, including setup instructions, request formats, and response codes, please refer to the official EVDSpec 2024.pdf document. This comprehensive guide provides all the technical specifications required for integrating with the CGrate service.
Requirements
- PHP 8.2 or higher
- PHP SOAP extension
Installation
Configuration
Alternatively, you can use the config helper:
Available Soap Methods
| Method | Description |
|---|---|
getAccountBalance() |
Get the account balance |
getAvailableCashDepositIssuers() |
Get Available Cash Deposit Issuers |
processCustomerPayment(PaymentRequestDTO $payment) |
Process a new customer payment |
queryCustomerPayment(string $transactionReference) |
Check the status of a customer payment |
processCashDeposit(string $paymentReference) |
Process Cash Deposit |
Available Static Helper Methods
| Method | Description |
|---|---|
generateTransactionReference(string $prefix = 'CG') |
Generate a unique transaction reference |
getCustomerIssuerName(string $customerAccount) |
Get Customer Account Issuer Name |
Usage
Check Account Balance
Get Available Cash Deposit Issuers
Process Customer Payment
Query Customer Payment
Process Cash Deposit
Generate Transaction Reference
Get Customer Account Issuer Name
Data Transfer Objects
The package uses read-only DTOs to handle API requests and responses:
Request DTOs
PaymentRequestDTO: Contains payment request data (transactionAmount, customerMobile, paymentReference)CashDepositRequestDTO: Contains cash deposit request data (transactionAmount, customerAccount, issuerName, depositorReference)
Response DTOs
BalanceResponseDTO: Contains account balance informationPaymentResponseDTO: Contains payment response informationCashDepositResponseDTO: Contains cash deposit response information
Response Codes
The package includes a comprehensive ResponseCode enum that provides all possible response codes from the CGrate API along with their descriptions:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of cgrate-php with dependencies
ext-soap Version *