Download the PHP package mdrazamani/asanpardakht-ipg-rest without Composer
On this page you can find all versions of the php package mdrazamani/asanpardakht-ipg-rest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mdrazamani/asanpardakht-ipg-rest
More information about mdrazamani/asanpardakht-ipg-rest
Files in mdrazamani/asanpardakht-ipg-rest
Package asanpardakht-ipg-rest
Short Description AsanPardakht IPG REST API integration package
License
Informations about the package asanpardakht-ipg-rest
AsanPardakht IPG REST Laravel Package
This Laravel package provides a seamless integration with AsanPardakht's IPG REST API, allowing you to handle online payments, transaction verifications, and settlements effortlessly.
Features
- Token Generation: Easily generate payment tokens.
- Transaction Verification: Verify the status of transactions.
- Settlement Processing: Manage post-transaction settlements.
- Seamless Redirection: Redirect users to the AsanPardakht payment gateway with ease.
Installation
To get started with this package, follow these simple steps:
1. Install via Composer
Run the following command in your Laravel project:
2. Publish Configuration
Publish the package configuration file using the following Artisan command:
3. Update Environment Variables
Add the following variables to your .env file to configure the package:
Usage
1. Generate Token and Redirect
Initiate a payment by generating a token and redirecting the user to AsanPardakht's payment gateway:
2. Verify Transaction
After the user returns to your site, verify the transaction:
3. Process Settlement
Once the transaction is verified, you can process the settlement:
Methods Overview
init($invoiceId, $amount)
: Initializes the payment with the given invoice ID and amount.token()
: Generates a payment token.verify($transactionId)
: Verifies the transaction.settlement($transactionId)
: Processes the settlement for the given transaction.redirect($token, $mobile = null)
: Redirects the user to the payment gateway.