PHPackages                             hydrogenafrica/hydrogenpay-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. hydrogenafrica/hydrogenpay-laravel

ActiveLibrary[Payment Processing](/categories/payments)

hydrogenafrica/hydrogenpay-laravel
==================================

A Laravel Package for Hydrogenpay

v1.0.1(1y ago)121↓100%MITPHPPHP ^7.4 || ^8.0 || ^8.1 || ^8.2

Since Jan 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HydrogenAfrica/hydrogenpay-laravel)[ Packagist](https://packagist.org/packages/hydrogenafrica/hydrogenpay-laravel)[ RSS](/packages/hydrogenafrica-hydrogenpay-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

HydrogenPay Laravel Package
===========================

[](#hydrogenpay-laravel-package)

Introduction
------------

[](#introduction)

The HydrogenPay Laravel package enables seamless and secure payment processing through card transactions and account transfers, ensuring faster delivery of goods and services.

Easily integrate HydrogenPay APIs into your Laravel applications with a simplified and efficient setup for smooth payment operations.

Key features:

- Collections: Card, Transfers, Payments, Bank Transfers.
- Confirmation: Payment Confirmation.

Table of Contents
-----------------

[](#table-of-contents)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Testing](#testing)
5. [Support](#Support)
6. [Contribution](#Contribution)
7. [License](#License)
8. [Hydrogenpay-API-References](#API-References)

Requirements
------------

[](#requirements)

1. PHP version 7.4, 8.0, 8.1, or 8.2.
2. Supported Laravel Versions: 7.x, 8.x, 9.x, 10.x, and 11.x
3. Composer must be installed.

Installation
------------

[](#installation)

1. To install the package, run

```
composer require hydrogenafrica/hydrogenpay-laravel
```

OR

Add the following line to the require block of your composer.json file.

```
"hydrogenafrica/hydrogenpay-laravel": "1.0.*"
```

You'll then need to run composer install or composer update to download it and have the autoloader updated.

2. Make sure you register the service provider, Once HydrogenPay Laravel is installed. Open up config/app.php and add the providers array.

```
HydrogenAfrica\Hydrogen\HydrogenServiceProvider::class,
```

3. Make sure you add HydrogenPay to the aliases

```
'HydrogenPay' => HydrogenAfrica\Hydrogen\Facades\Hydrogen::class
```

4. Publish the configuration file using this command:

```
php artisan vendor:publish --provider="HydrogenAfrica\Hydrogen\HydrogenServiceProvider"
```

A configuration-file named hydrogenpay.php will be placed in your config directory.

Get your keys from [here](https://dashboard.hydrogenpay.com)

Add the following environment variables to your .env file:

```
LIVE_API_KEY=SK_LIVE_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SANDBOX_KEY=PK_TEST_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MODE=TEST
```

- LIVE\_API\_KEY: Your HydrogenPay live API key obtained from the dashboard. (Required)
- SANDBOX\_KEY: Your HydrogenPay sandbox API key obtained from the dashboard. (Required)
- MODE: Defines the environment mode. Set to LIVE to use the LIVE\_API\_KEY or TEST to use the SANDBOX\_KEY. (Required)

Usage
=====

[](#usage)

This documentation covers all components of the hydrogen\_laravel SDK. Set up routes, view and controller methods like so:

`1. Setup Routes`
-----------------

[](#1-setup-routes)

```
