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): CustomerDto
fetchCustomer(string $email): ?CustomerDto
initializePurchaseTransaction(TransactionInitPayloadDto $data): TransactionInitializationDto
initializeSubscriptionTransaction(string $email, int $amount): TransactionInitializationDto
createSubscription(string $customer_id): SubscriptionDto
manageSubscription(string $subscription_id): string
fetchSubscription(string $subscription_id): ?SubscriptionDto
enableSubscription(string $subscription_id): bool
disableSubscription(string $subscription_code): bool
isValidPaystackWebhook($payload, $signature): bool
fetchBanks(): ?Collection
validateAccountNumber(string $account_number, string $bank_code): bool
checkPTBalanceIsSufficient(int $amount): bool
createTransferRecipient($name, $account_number, $bank_code): TransferRecipientDto
initiateTransfer(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