PHPackages                             rebel/rebel-rebelpay - 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. rebel/rebel-rebelpay

ActiveLibrary[Payment Processing](/categories/payments)

rebel/rebel-rebelpay
====================

Paystack Laravel package

v1.3.0(2y ago)125[2 PRs](https://github.com/kwadejeffrey/Rebel-RebelPay/pulls)MITPHPPHP ^8.1

Since Apr 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kwadejeffrey/Rebel-RebelPay)[ Packagist](https://packagist.org/packages/rebel/rebel-rebelpay)[ Docs](https://github.com/rebel/rebel-rebelpay)[ RSS](/packages/rebel-rebel-rebelpay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (8)Used By (0)

Paystack Laravel package
========================

[](#paystack-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/04193cab4dead55b2ffc80d3b0f1d816d5242e74e3b46cfebe3add6e3207a7f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726562656c2f726562656c2d726562656c7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rebel/rebel-rebelpay)

[![Total Downloads](https://camo.githubusercontent.com/224c919db33980a7d8463dd29be605641cea639614ad29b168dda9eacee4bd42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726562656c2f726562656c2d726562656c7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rebel/rebel-rebelpay)

This is a Laravel composer package that simplifies accepting payments on [Paystack](https://paystack.com).

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

[](#installation)

You can install the package via composer:

```
composer require rebel/rebel-rebelpay
```

Run this command to publish the config file and all necessary files:

```
php artisan rebel-rebelpay:install
```

You can publish the config file with:

```
php artisan vendor:publish --tag="rebel-rebelpay-config"
```

This is the contents of the published config file:

```
return [
    'publickey' => env('PAYSTACK_PUBLIC_KEY'),

    'secretkey' => env('PAYSTACK_SECRET_KEY'),

    'paystackurl' => env('PAYSTACK_PAYMENT_URL'),

    'merchantmail' => env('MERCHANT_EMAIL'),
];
```

Features
--------

[](#features)

- Payments
- Get all transactions records from Paystack
- Get single transaction record from Paystack
- Fetch all successful transaction Paystack
- Fetch all failed transaction Paystack
- Fetch all abandoned transaction Paystack
- Export transactions in csv format
- Fetch transactions history

Workflow of this package
------------------------

[](#workflow-of-this-package)

1. The customer is redirected to the payment provider's site.

- After customer completes the checkout form on your website, feed the package with the necessary data and the customer will be redirect to [paystack](https://paystack.com/) to complete payment.

2. The customer arrives on paystack platform

- After the customer is redirected to [paystack](https://paystack.com/), they can choose from the available payment options based on your account settings with [paystack](https://paystack.com/) and complete the transaction.

3. Customer is redirect to website

- After the customer has completed the transaction on [Paystack's](https://paystack.com/) website, they will be redirected back to a route that we have set up in our Laravel application instead of relying on [Paystack's](https://paystack.com/) callback webhook.

Environment Variables
---------------------

[](#environment-variables)

- `PAYSTACK_PUBLIC_KEY= insert your Paystack public key`
- `PAYSTACK_SECRET_KEY= insert your Paystack secret key`
- `PAYSTACK_PAYMENT_URL=https://api.paystack.co`
- `MERCHANT_EMAIL= kwadejeffrey@gmail.com`

Usage/Examples
--------------

[](#usageexamples)

```
$rebelPay = new Rebel\RebelPay();
echo $rebelPay->echoPhrase('Hello, Rebel!');
```

```
