Download the PHP package basit/laravel-fastpay-integration without Composer
On this page you can find all versions of the php package basit/laravel-fastpay-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download basit/laravel-fastpay-integration
More information about basit/laravel-fastpay-integration
Files in basit/laravel-fastpay-integration
Package laravel-fastpay-integration
Short Description Integrate FastPay Payment Gateway to Laravel Application
License MIT
Informations about the package laravel-fastpay-integration
Laravel Fastpay Integration Package
This package provides integration with Fastpay, allowing you to initiate payments, validate payments, process refunds, and validate refunds in your Laravel application.
Translations
We have provided translations of this README in different languages:
- Kurdish (Ku)
- Arabic (Ar)
Please note that these translations were done using Google Translate and may not be 100% accurate. If you find any inaccuracies or have suggestions for improvement, feel free to let us know. Your feedback is valuable to us!
Installation
You can install the package via composer:
Publish the config file with:
After installing the package, make sure to add the following environment variables to your .env
file:
Note: Ensure to set the FASTPAY_ENVIRONMENT
variable in your .env
file to either "staging" or "production" based on your requirements.
Usage
1. Initiate Payment
Success Response
Payment Notification Validation (IPN URL)
Fastpay sends a POST request to your IPN URL with payment information before redirecting the user back to your website. This IPN notification is essential for validating the transaction and preventing fraudulent payments. Your IPN URL should be set up to handle these payment notifications and perform validation based on the received data.
When Fastpay sends an IPN notification to your IPN URL, the POST request will include the following data:
gw_transaction_id
: Alphanumeric identifier of the transaction.merchant_order_id
: Alphanumeric identifier of your order (replace YOUR_ORDER_ID with this value).received_amount
: Decimal value representing the received payment amount.currency
: String representing the currency (e.g., IQD).status
: String representing the status of the payment (e.g., "Success").customer_name
: String containing the name of the customer.customer_mobile_number
: String containing the customer's phone number.at
: Date and time of the transaction in the format "Y-m-d H:i:s" (e.g., "2020-11-26 13:54:01").
You should use this information to validate the payment and ensure the transaction is genuine and accurate.
2. Validate Payment
Success Response
3. Process Refund
Success Response
4. Validate Refund
Success Response
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Feel free to contribute to this project
Found an Issue or Bug?
If you encounter any issues, bugs, or have questions about this package, we encourage you to report them on our GitHub Issues page. Please check if the issue has already been reported before creating a new one. When reporting an issue, provide as much detail as possible, including the steps to reproduce it, the expected behavior, and the actual behavior.
We value your feedback, and we'll do our best to address and resolve the issues in a timely manner. Your contributions are essential to improving this package for everyone.
Credits
License
The MIT License (MIT). Please see License File for more information.