myomyintaung512 / php-dinger-prebuilt
A PHP package for Dinger Payment Integration
1.0.0
2025-02-17 09:32 UTC
Requires
- php: >=7.2
- phpseclib/phpseclib: ~2.0
This package is not auto-updated.
Last update: 2025-06-24 09:40:01 UTC
README
A PHP package for integrating Dinger Payment Gateway.
Installation
composer require myomyintaung512/php-dinger-prebuilt
Usage
use myomyintaung512\DingerPrebuilt\DingerPrebuilt; // Initialize with custom config (optional) $config = [ 'clientId' => 'your-client-id', 'merchantKey' => 'your-merchant-key', 'publicKey' => 'your-public-key', 'projectName' => 'your-project-name', 'merchantName' => 'your-merchant-name', 'hashKey' => 'your-hash-key', 'baseUrl' => 'https://prebuilt.dinger.asia' // optional ]; $dinger = new DingerPrebuilt($config); // Prepare items $items = [ [ 'name' => 'Product 1', 'amount' => '1000', 'quantity' => '1' ] ]; // Generate payment URL $paymentUrl = $dinger->createPayment( $items, 'Customer Name', '1000', 'ORDER123' ); // Redirect to payment URL header("Location: " . $paymentUrl);
License
MIT