Download the PHP package astimpay/laravel-sdk without Composer
On this page you can find all versions of the php package astimpay/laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download astimpay/laravel-sdk
More information about astimpay/laravel-sdk
Files in astimpay/laravel-sdk
Package laravel-sdk
Short Description AstimPay offers a range of payment automation solutions for small entrepreneurs in Bangladesh.
License MIT
Informations about the package laravel-sdk
AstimPay Laravel SDK
The AstimPay Laravel SDK allows you to seamlessly integrate the AstimPay payment gateway into your Laravel applications.
Table of Contents
- Installation
- Usage
- Initializing the SDK
- Initializing a Payment
- Verifying a Payment
- Handling IPN Notifications
- Notes
Installation
Run the following command in your project directory:
Usage
Initializing the SDK
Initializing a Payment
To initiate a payment, follow these steps:
-
Initialize the
AstimPay
class with your API key and base URL: - Prepare payment request data and initiate payment:
Available API Types
The initPayment
method allows you to specify the API type as the second parameter. The available options are:
checkout-v1
: Advanced checkout API (default, Success Page notification only).
Verifying a Payment
To verify a payment, follow these steps:
-
Initialize the
AstimPay
class as shown in the previous steps. -
Get the invoice ID from the payment success page:
- Verify the payment:
Handling IPN Notifications (Optional)
To handle IPN (Instant Payment Notification) requests, follow these steps:
-
Initialize the
AstimPay
class as shown in the previous steps. - Use the
executePayment
method:
Notes
- Replace
"API KEY"
with your actual API key. - Adjust the request data and other details according to your project requirements.
- The
metadata
field is dynamic; you can add multiple key-value pairs as needed. - Make sure to handle errors using try-catch blocks as demonstrated above.