Download the PHP package intune/laravel-paystack without Composer
On this page you can find all versions of the php package intune/laravel-paystack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download intune/laravel-paystack
More information about intune/laravel-paystack
Files in intune/laravel-paystack
Package laravel-paystack
Short Description Utility API Layer for Paytstack Integration
License MIT
Informations about the package laravel-paystack
Laravel Paystack Package
A Laravel package for seamless integration with the Paystack payment gateway. This package provides various functionalities, including customer management, transaction initialization, subscription handling, and more.
Features
- Create and manage customers on Paystack.
- Initialize transactions for purchases and subscriptions.
- Handle subscriptions: create, manage, enable, and disable.
- Validate account numbers and retrieve a list of banks.
- Initiate transfers and check balances.
Installation
You can install the package via Composer:
Configuration
After installation, publish the configuration file using the following command:
This will create a paystack.php file in your config directory, where you can set your Paystack API credentials:
Make sure to add the following environment variables to your .env file:
Usage
Creating a Customer
To create a new customer on Paystack:
Initializing a Transaction
To initialize a transaction:
Subscribing a Customer
To create a subscription for a customer:
Managing a Subscription
To get a link for managing a subscription:
Validating a Webhook
To validate a Paystack webhook:
Available Methods
createCustomer(UserDto $user): CustomerDtofetchCustomer(string $email): ?CustomerDtoinitializePurchaseTransaction(TransactionInitPayloadDto $data): TransactionInitializationDtoinitializeSubscriptionTransaction(string $email, int $amount): TransactionInitializationDtocreateSubscription(string $customer_id): SubscriptionDtomanageSubscription(string $subscription_id): stringfetchSubscription(string $subscription_id): ?SubscriptionDtoenableSubscription(string $subscription_id): booldisableSubscription(string $subscription_code): boolisValidPaystackWebhook($payload, $signature): boolfetchBanks(): ?CollectionvalidateAccountNumber(string $account_number, string $bank_code): boolcheckPTBalanceIsSufficient(int $amount): boolcreateTransferRecipient($name, $account_number, $bank_code): TransferRecipientDtoinitiateTransfer(string $amount, string $recipient_code, string $reference): TransferDto
License
This package is licensed under the MIT License. See the LICENSE file for more information.
All versions of laravel-paystack with dependencies
guzzlehttp/guzzle Version ^7.9
laravel/framework Version ^8.0|^9.0|^10.0|^11.0