myomyintaung512 / laravel-dinger-prebuilt
There is no license information available for the latest version (v1.0.8) of this package.
Laravel package for Dinger Prebuilt Form payment integration
v1.0.8
2025-02-20 03:12 UTC
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2025-06-26 04:52:56 UTC
README
A Laravel package for integrating Dinger payment gateway into your Laravel applications.
Installation
You can install the package via composer:
composer require myomyintaung512/laravel-dinger-prebuilt
Configuration
First publish the configuration file:
php artisan vendor:publish --provider="myomyintaung512\LaravelDingerPrebuilt\DingerServiceProvider"
Add the following configuration to your .env file:
DINGER_CLIENT_ID=your_client_id DINGER_MERCHANT_KEY=your_merchant_key DINGER_PUBLIC_KEY=your_public_key DINGER_PROJECT_NAME=your_project_name DINGER_MERCHANT_NAME=your_merchant_name DINGER_HASH_KEY=your_hash_key DINGER_BASE_URL=https://prebuilt.dinger.asia
Basic Usage
You can use the Dinger instance in two ways:
Using Dependency Injection
use myomyintaung512\LaravelDingerPrebuiltForm\DingerPrebuilt; class PaymentController extends Controller { public function checkout(DingerPrebuilt $dinger) { $items = [ [ 'name' => 'Product 1', 'amount' => 1000, 'quantity' => 1 ] ]; $paymentUrl = $dinger->createPayment( $items, 'Customer Name', 1000, 'ORDER_123' ); return redirect($paymentUrl); } }
use myomyintaung512\LaravelDinger\Dinger; $dinger = new Dinger([ 'api_key' => env('DINGER_API_KEY'), 'merchant_name' => env('DINGER_MERCHANT_NAME'), 'merchant_id' => env('DINGER_MERCHANT_ID'), 'production' => env('DINGER_PRODUCTION', false), ]); $payment = $dinger->createPayment([ 'amount' => 1000, 'order_id' => 'ORDER_123', 'description' => 'Product purchase', 'customer_name' => 'Mg Mg', 'customer_phone' => '09123456789', 'customer_email' => 'mgmg@example.com', 'redirect_url' => 'https://your-website.com/payment/callback' ]);
Environment
- Production URL: https://form.dinger.asia
- Staging URL: https://prebuilt.dinger.asia
License
The MIT License (MIT). Please see License File for more information.