Download the PHP package p4ndish/laravel-santimpay without Composer
On this page you can find all versions of the php package p4ndish/laravel-santimpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download p4ndish/laravel-santimpay
More information about p4ndish/laravel-santimpay
Files in p4ndish/laravel-santimpay
Package laravel-santimpay
Short Description A Laravel package for Santim Pay payment gateway integration.
License MIT
Informations about the package laravel-santimpay
laravel-santimpay
Laravel package for integrating SantimPay payment gateway.
Requirements
- PHP: 8.2+
- Laravel / Illuminate: 11.x or 12.x
Installation
Via Composer (Packagist)
Via Composer (VCS / local development)
If the package is not published yet, you can install it from a Git repository:
Then run:
Configuration
Publish the config file:
This will publish config/santimpay.php.
Environment variables
Add the following to your .env:
Private key
The package loads the private key from the filesystem using:
storage_path(config('santimpay.private_key_path'))
Example:
- Put your key at:
storage/app/santimpay/private.pem - Set:
SANTIMPAY_PRIVATE_KEY_PATH=app/santimpay/private.pem
Make sure your key file is not committed to git.
Usage
The package registers a singleton in the container as santimpay and also provides a facade alias SantimPay.
Generate a transaction ID
Initiate a payment
initiatePayment(...) returns an array like:
status_code(int)url(string|null) payment redirect URLbody(array) full response JSON
Example controller action:
Check transaction status
Handling redirects and notifications
SantimPay can redirect the customer back to your app (success/failure/cancel), and it can also call your notifyUrl.
Recommended approach:
- Create routes/controllers for:
SANTIMPAY_SUCCESS_URLSANTIMPAY_FAILURE_URLSANTIMPAY_CANCEL_REDIRECT_URLSANTIMPAY_NOTIFY_URL
- In those handlers, verify the transaction with
checkTransactionStatus($merchantTxnId)before marking an order as paid.
Error handling
Most failures during API calls are thrown as P4ndish\SantimPay\Exception\SantimPayException.
Security notes
- Never commit your private key.
- Prefer storing the key under
storage/and restricting file permissions. - Always validate/verify transactions server-side using
checkTransactionStatus(...).
Contributing
Contributions are welcome.
- Fork the repo
- Create a feature branch
- Open a PR
License
MIT