Getting Started
This package is for Laravel applications that want a typed Paystack integration without passing raw arrays through the public SDK surface.
What you get
- container-resolved action classes
- typed input DTOs under
src/Data/Input - action-specific response DTOs under
src/Data/Output - a Saloon connector that handles auth, base URL, retries, timeouts, and API error behavior
- optional
Paystackfacade andPaystackManager
Typical flow
- Install the package.
- Configure your Paystack secret and public keys.
- Resolve an action or use the facade.
- Pass a typed input DTO.
- Work with the typed response DTO returned by the package.
Example
php
use Maxiviper117\Paystack\Actions\Transaction\InitializeTransactionAction;
use Maxiviper117\Paystack\Data\Input\Transaction\InitializeTransactionInputData;
$initializeTransaction = app(InitializeTransactionAction::class);
$response = $initializeTransaction(
new InitializeTransactionInputData(
email: 'customer@example.com',
amount: 15.50,
callbackUrl: 'https://example.com/payments/callback',
)
);From here, continue with: