Download the PHP package semernur/chapa without Composer

On this page you can find all versions of the php package semernur/chapa. 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 chapa

Chapa Package for Laravel

Chapa is one of the payment gateways in Ethiopia. This laravel package will help you integrate chapa with your next/existing laravel project.Install via

composer require semernur/chapa

This package has functionalities that will help you to easily initialize payment,verify payment at the moment and other functionalities will be added very soon .

Docs

First thing is first before you start using this package you need to have Chapa API key which you can get one from

Chapa

Once you get your API key add your secret key inside .env file or You can pass it directly to the constructor.if you are using the former method which is accessing via .env file the variable should have name CHAPA_SECRET_KEY . After successful installation you need to run php artisan migrate in order to setup database table for the package.

Available Methods

initializePayment(array $details, bool $will_redirect = FALSE, string $custom_ref = NULL)

$details, details you need to initialize in chapa's API. You don't need to pass authorization tokens! $will_redirect, if set to true it will redirect customer to the checkout_url automatically if the payment initialization was successful.

$custom_ref if not NULL initializePayment will use $custom_ref for chapa`s tx_ref field.

if $custom_ref is not defined and $ref_prefix is defined initializePayment will generate unique tx_ref with prefix $ref_prefix. Note:- initializePayment will return Chapa`s response/object whether you set $will_redirect to TRUE or FALSE.

verifyPayment(string $tx_ref, bool $only_status = FALSE)

This method will verify payment require $tx_ref transaction reference to the transaction need to be verified.If $only_status set to true it only return the status of the transaction TRUE if the transaction status is success false otherwise.

Enjoy!


All versions of chapa with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
guzzlehttp/guzzle Version ^7.4.5
illuminate/support Version *
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 semernur/chapa contains the following files

Loading the files please wait ...