Download the PHP package uddoktapay/laravel-sdk without Composer
On this page you can find all versions of the php package uddoktapay/laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uddoktapay/laravel-sdk
More information about uddoktapay/laravel-sdk
Files in uddoktapay/laravel-sdk
Package laravel-sdk
Short Description UddoktaPay offers a range of payment automation solutions for small entrepreneurs in Bangladesh.
License MIT
Informations about the package laravel-sdk
UddoktaPay Laravel SDK
The UddoktaPay Laravel SDK allows you to seamlessly integrate the UddoktaPay 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
UddoktaPay
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
: Basic checkout API (IPN notification only).checkout-v2
: Advanced checkout API (default, Success Page notification only).checkout/global
: Global basic checkout API (IPN notification only).checkout-v2/global
: Global advanced checkout API (Success Page notification only).
Verifying a Payment
To verify a payment, follow these steps:
-
Initialize the
UddoktaPay
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
UddoktaPay
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.