Download the PHP package asciisd/cashier-paytiko without Composer
On this page you can find all versions of the php package asciisd/cashier-paytiko. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cashier-paytiko
Cashier Paytiko
A Laravel package that integrates Paytiko payment processor with Cashier Core. This package provides a clean, scalable implementation of Paytiko's Hosted Page solution with comprehensive webhook handling.
Features
- Simplified Payment API: Easy-to-use
simpleCharge(amount, params)method with automatic configuration - Hosted Page Integration: Seamless integration with Paytiko's hosted payment pages
- Automatic Configuration: URLs, order IDs, and descriptions auto-generated from config
- Webhook Handling: Automatic webhook processing with signature verification
- Event System: Laravel events for payment status updates
- DTO Architecture: Clean data transfer objects for type safety
- Comprehensive Testing: Full test suite with Pest
- Scalable Design: Easy to extend for additional Paytiko features
- Laravel Integration: Native Laravel package with service provider
- Signature Security: Automatic signature generation and verification
Installation
Install the package via Composer:
Publish the configuration file:
Configuration
Add the following environment variables to your .env file:
Usage
Simplified Payment Processing (Recommended)
The new simpleCharge method provides a streamlined way to process payments with minimal configuration:
What simpleCharge Auto-Generates
When using simpleCharge, the following are automatically handled:
- Order ID: Generated using
deposit-{timestamp}-{random} - Description: Auto-generated based on amount (e.g., "Deposit $100.00")
- Webhook URL: Uses config value or falls back to Laravel route
- Success/Failed URLs: Uses config values or falls back to Laravel routes
- Currency: Uses config default (USD) if not specified
- Timestamp: Automatically generated for signature creation
Basic Payment Processing (Legacy)
Registering with Cashier Core
Add Paytiko to your config/cashier-core.php:
Webhook Handling
The package automatically registers a webhook endpoint at /api/webhooks/paytiko. Configure this URL in your Paytiko dashboard.
Listening to Events
Advanced Configuration
Custom Webhook URL per Payment
Credit Card Only Mode
Disable Specific Payment Processors
Payout Mode
Data Transfer Objects
The package uses DTOs for type safety and clean data handling:
PaytikoHostedPageRequest
PaytikoWebhookData
Testing
Run the test suite:
Run tests with coverage:
Example Tests
Testing the Simplified Method
Testing the Legacy Method
Security
- Signature Verification: All webhooks are verified using SHA256 signatures
- HTTPS Required: All API communications use HTTPS
- Input Validation: Comprehensive validation of all input data
- Error Handling: Secure error handling without exposing sensitive data
Extending the Package
The package is designed to be easily extensible. You can add new Paytiko features by:
- Creating new DTOs for request/response data
- Adding new methods to the
PaytikoProcessor - Creating new events for additional webhook types
- Extending the service classes for new API endpoints
Example: Adding Direct Payment API
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.
Support
For support, please open an issue on GitHub or contact us at [email protected].
Changelog
v1.2.0 (dev-main)
- NEW: Added
simpleCharge(amount, params)method for simplified payment processing - NEW: Automatic order ID generation with
deposit-{timestamp}-{random}format - NEW: Auto-generated descriptions based on payment amount
- NEW: Automatic URL handling with config fallbacks and Laravel route support
- NEW: Comprehensive test suite for simplified payment method
- NEW: Example usage documentation and code samples
- IMPROVED: Better separation between simplified and legacy payment methods
- IMPROVED: Enhanced error handling and validation for simplified API
v1.0.0
- Initial release
- Hosted Page integration
- Webhook handling with events
- Comprehensive test suite
- Full documentation
All versions of cashier-paytiko with dependencies
laravel/framework Version ^11.0|^12.0|^13.0
asciisd/cashier-core Version ^2.1
guzzlehttp/guzzle Version ^7.0