Genie Business Payment Gateway Plugin for Botble CMS
byheartlk/botble-genie-payment is a Laravel package for genie business payment gateway plugin for botble cms.
It currently has 1 GitHub stars and 0 downloads on Packagist (latest version 1.0.0).
Install it with composer require byheartlk/botble-genie-payment.
Discover more Laravel packages by byheartlk
or browse all Laravel packages to compare alternatives.
Last updated
A comprehensive payment gateway plugin for Botble CMS that integrates with Genie Business (Dialog Axiata PLC) to accept secure online payments in Sri Lanka. This plugin enables merchants to accept Visa, MasterCard, and American Express payments through Genie Business's robust payment infrastructure.
php-curl, php-json, php-mbstringDownload the Plugin
git clone https://github.com/thusithawijethunga/botble-genie-payment.git
zip -r botble-genie-payment.zip genie-payment/
Upload via Admin Panel
Admin Panel > Plugins > Add Newgenie-payment.zipActivate the Plugin
Admin Panel > PluginsDownload and Extract
cd platform/plugins/
git clone https://github.com/thusithawijethunga/botble-genie-payment.git
cd genie-payment
Install Dependencies
composer install --no-dev
Run Migrations
php artisan migrate
Activate via Admin Panel
Admin Panel > PluginsLogin to Genie Business Dashboard
Get API Keys
Connect sectionApplication ID and App KeyAccess Payment Settings
Admin Panel > Payments > Payment MethodsEnter Configuration
Method Name: Credit / Debit Card (Powered by Genie Business)
Description: Pay securely by Credit or Debit card through Genie Business...
Application ID: [Your Application ID from Genie Dashboard]
API Key: [Your App Key from Genie Dashboard]
Environment: Sandbox (for testing) / Production (for live)
Payment Link Validity: 24 hours (1-2160 hours)
Enable Webhooks: Yes (recommended)
Debug Mode: Yes (for development)
Save and Activate
Use Test Cards (Sandbox Mode)
Visa: 4761 3400 0000 0035 | 12/25 | 817
MasterCard: 5099 9930 0011 6951 | 03/27 | 986
Verify Webhook URL
https://yourdomain.com/payment/genie/webhook is accessibleSelect Payment Method
Complete Payment
Monitor Transactions
Admin Panel > PaymentsHandle Refunds
use Botble\GeniePayment\Services\Gateways\GeniePaymentService;
$genieService = new GeniePaymentService();
$paymentData = [
'amount' => 250.00,
'currency' => 'LKR',
'order_id' => [123],
'description' => 'Package Subscription Payment',
'customer_id' => 456,
'customer_type' => 'App\\Models\\Customer',
'callback_url' => route('payment.callback'),
'return_url' => route('payment.return'),
'address' => [
'email' => '[email protected]',
'name' => 'John Doe'
]
];
$paymentUrl = $genieService->execute($paymentData);
use Botble\GeniePayment\Models\GenieTransaction;
// Check transaction status
$transaction = GenieTransaction::findByTransactionId($transactionId);
if ($transaction->isCompleted()) {
// Payment successful
} elseif ($transaction->isFailed()) {
// Payment failed
} else {
// Payment pending
}
// Webhook endpoint: POST /payment/genie/webhook
// Automatically handled by GeniePaymentController@webhook
// Manual webhook processing
$webhookData = $request->all();
$result = $genieService->processWebhook($request);
# Run plugin tests
php artisan test --filter=GeniePayment
# Run with coverage
php artisan test --filter=GeniePayment --coverage
Sandbox Environment
Payment Flow Testing
# Test payment creation
curl -X POST https://yourdomain.com/test-payment \
-H "Content-Type: application/json" \
-d '{"amount": 100, "currency": "LKR"}'
Payment URL Not Generated
Issue: "Invalid response from payment gateway"
Solution: Check API credentials and network connectivity
Webhook Not Received
Issue: Payment status not updating automatically
Solution: Verify webhook URL accessibility and firewall settings
Signature Validation Failed
Issue: "Invalid payment signature"
Solution: Ensure API key is correct and not truncated
Enable debug mode to get detailed logs:
// In plugin settings
'payment_genie_payment_debug' => true
// Check logs
tail -f storage/logs/laravel.log | grep "Genie"
# Application logs
storage/logs/laravel.log
# Web server logs
/var/log/nginx/access.log
/var/log/nginx/error.log
CREATE TABLE `genie_payment_transactions` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`transaction_id` varchar(255) DEFAULT NULL,
`charge_id` varchar(255) DEFAULT NULL,
`order_id` varchar(255) NOT NULL,
`amount` decimal(15,2) NOT NULL,
`currency` varchar(3) NOT NULL DEFAULT 'LKR',
`status` varchar(255) NOT NULL DEFAULT 'initiated',
`payment_url` text,
`short_url` text,
`customer_id` varchar(255) DEFAULT NULL,
`customer_type` varchar(255) DEFAULT NULL,
`expires_at` timestamp NULL DEFAULT NULL,
`verified_at` timestamp NULL DEFAULT NULL,
`webhook_received_at` timestamp NULL DEFAULT NULL,
`payment_data` json DEFAULT NULL,
`api_response` json DEFAULT NULL,
`webhook_data` json DEFAULT NULL,
`notes` text,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `transaction_id` (`transaction_id`),
KEY `charge_id` (`charge_id`),
KEY `order_id` (`order_id`),
KEY `status_created_at` (`status`,`created_at`)
);
We welcome contributions! Please follow these steps:
Fork the Repository
git fork https://github.com/thusithawijethunga/botble-genie-payment.git
Create Feature Branch
git checkout -b feature/your-feature-name
Make Changes
Submit Pull Request
# Clone repository
git clone https://github.com/thusithawijethunga/botble-genie-payment.git
cd genie-payment
# Install dependencies
composer install
# Set up testing environment
cp .env.example .env.testing
php artisan key:generate --env=testing
# Run tests
php artisan test
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Genie Business Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Genie Business is a comprehensive payment solution by Dialog Axiata PLC, Sri Lanka's premier connectivity provider. This plugin enables seamless integration between Botble CMS and Genie Business payment infrastructure.
Botble CMS is a modern, fast, and flexible content management system built on Laravel framework, perfect for creating professional websites and applications.
Made with โค๏ธ for the Sri Lankan e-commerce community
๐ Website โข ๐ง Email โข ๐ฑ Download App