PHPackages                             byheartlk/botble-genie-payment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. byheartlk/botble-genie-payment

ActiveBotble-plugin[Payment Processing](/categories/payments)

byheartlk/botble-genie-payment
==============================

Genie Business Payment Gateway Plugin for Botble CMS

1.0.0(10mo ago)10MITPHPPHP ^8.1

Since Jun 29Pushed 4mo agoCompare

[ Source](https://github.com/thusithawijethunga/botble-genie-payment)[ Packagist](https://packagist.org/packages/byheartlk/botble-genie-payment)[ RSS](/packages/byheartlk-botble-genie-payment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Genie Business Payment Gateway for Botble CMS
=============================================

[](#genie-business-payment-gateway-for-botble-cms)

[![Version](https://camo.githubusercontent.com/34e695c6016bc2a934a96bed696e29b2f2ab562a7134d65a55d00653cd506bea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75652e737667)](https://github.com/thusithawijethunga/botble-genie-payment)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Botble](https://camo.githubusercontent.com/325111af33a79bd321d4f66ccc25dcb64a0ba02328ec63931a1f084467b59f72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f426f74626c652d372e302b2d6f72616e67652e737667)](https://kadapela.lk)[![PHP](https://camo.githubusercontent.com/45d36955804bf3f4f17097b05a7f41a28e578dc24e0d3ad0d21ae9d9762f44c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c75652e737667)](https://php.net)

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.

🌟 Features
----------

[](#-features)

### 💳 Payment Processing

[](#-payment-processing)

- **Secure Payment Processing**: SSL-encrypted transactions with PCI compliance
- **Multiple Card Support**: Accept Visa, MasterCard, and American Express
- **Multi-Currency**: Support for LKR (primary) and USD
- **Mobile Optimized**: Responsive payment pages for all devices
- **Real-time Processing**: Instant payment confirmation and processing

### 🔧 Technical Features

[](#-technical-features)

- **Webhook Integration**: Real-time payment status updates
- **Signature Validation**: Secure API signature verification
- **Transaction Management**: Complete transaction lifecycle tracking
- **Debug Mode**: Comprehensive logging for development and troubleshooting
- **Sandbox Support**: Full testing environment integration
- **Database Logging**: Detailed transaction and webhook logging

### 🎯 Business Features

[](#-business-features)

- **Package Subscriptions**: Seamless integration with Botble's job board packages
- **Customer Management**: Track payments by customer and order
- **Payment Analytics**: Transaction reporting and status monitoring
- **Refund Support**: Manual refund process through Genie dashboard
- **Multi-language**: English language support with easy translation

### 🛡️ Security &amp; Compliance

[](#️-security--compliance)

- **API Authentication**: Secure API key and application ID authentication
- **Request Signing**: SHA1 signature validation for all transactions
- **Environment Separation**: Dedicated sandbox and production environments
- **Error Handling**: Comprehensive error handling and user feedback
- **CSRF Protection**: Built-in CSRF token validation

📋 Requirements
--------------

[](#-requirements)

- **Botble CMS**: Version 6.4 or higher
- **PHP**: Version 8.1 or higher
- **Extensions**: `php-curl`, `php-json`, `php-mbstring`
- **Database**: MySQL 5.7+ or MariaDB 10.3+
- **SSL Certificate**: Required for production environment
- **Genie Business Account**: Active merchant account with Dialog Axiata

🚀 Installation
--------------

[](#-installation)

### Method 1: Via Admin Panel (Recommended)

[](#method-1-via-admin-panel-recommended)

1. **Download the Plugin**

    ```
    git clone https://github.com/thusithawijethunga/botble-genie-payment.git
    zip -r botble-genie-payment.zip genie-payment/
    ```
2. **Upload via Admin Panel**

    - Navigate to `Admin Panel > Plugins > Add New`
    - Click "Upload Plugin" and select `genie-payment.zip`
    - Click "Install Now"
3. **Activate the Plugin**

    - Go to `Admin Panel > Plugins`
    - Find "Genie Business Payment Gateway"
    - Click "Activate"

### Method 2: Manual Installation

[](#method-2-manual-installation)

1. **Download and Extract**

    ```
    cd platform/plugins/
    git clone https://github.com/thusithawijethunga/botble-genie-payment.git
    cd genie-payment
    ```
2. **Install Dependencies**

    ```
    composer install --no-dev
    ```
3. **Run Migrations**

    ```
    php artisan migrate
    ```
4. **Activate via Admin Panel**

    - Navigate to `Admin Panel > Plugins`
    - Find and activate "Genie Business Payment Gateway"

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Get API Credentials

[](#1-get-api-credentials)

1. **Login to Genie Business Dashboard**

    - Visit:
    - Use your registered mobile number to login
2. **Get API Keys**

    - Navigate to `Connect` section
    - Copy your `Application ID` and `App Key`

### 2. Configure Plugin Settings

[](#2-configure-plugin-settings)

1. **Access Payment Settings**

    - Go to `Admin Panel > Payments > Payment Methods`
    - Find "Genie Business Payment Gateway"
    - Click "Settings"
2. **Enter 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)

    ```
3. **Save and Activate**

    - Click "Activate" to enable the payment method

### 3. Test Configuration

[](#3-test-configuration)

1. **Use Test Cards** (Sandbox Mode)

    ```
    Visa: 4761 3400 0000 0035 | 12/25 | 817
    MasterCard: 5099 9930 0011 6951 | 03/27 | 986

    ```
2. **Verify Webhook URL**

    - Ensure `https://yourdomain.com/payment/genie/webhook` is accessible
    - Check firewall and server configurations

📖 Usage
-------

[](#-usage)

### For Customers

[](#for-customers)

1. **Select Payment Method**

    - During checkout, select "Credit / Debit Card (Powered by Genie Business)"
    - Review payment details and terms
2. **Complete Payment**

    - Click "Pay Now" to redirect to Genie Business payment page
    - Enter card details and complete 3D Secure authentication
    - Automatic redirect back to your site upon completion

### For Merchants

[](#for-merchants)

1. **Monitor Transactions**

    - View transaction status in `Admin Panel > Payments`
    - Real-time status updates via webhooks
    - Detailed transaction logs and analytics
2. **Handle Refunds**

    - Refunds must be processed manually through Genie Business dashboard
    - Update order status in Botble admin panel accordingly

🔗 API Integration
-----------------

[](#-api-integration)

### Transaction Creation

[](#transaction-creation)

```
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' => 'customer@example.com',
        'name' => 'John Doe'
    ]
];

$paymentUrl = $genieService->execute($paymentData);
```

### Status Checking

[](#status-checking)

```
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 Handling

[](#webhook-handling)

```
// Webhook endpoint: POST /payment/genie/webhook
// Automatically handled by GeniePaymentController@webhook

// Manual webhook processing
$webhookData = $request->all();
$result = $genieService->processWebhook($request);
```

🧪 Testing
---------

[](#-testing)

### Unit Tests

[](#unit-tests)

```
# Run plugin tests
php artisan test --filter=GeniePayment

# Run with coverage
php artisan test --filter=GeniePayment --coverage
```

### Integration Testing

[](#integration-testing)

1. **Sandbox Environment**

    - Set environment to "Sandbox"
    - Use provided test card numbers
    - Verify webhook delivery
2. **Payment Flow Testing**

    ```
    # Test payment creation
    curl -X POST https://yourdomain.com/test-payment \
         -H "Content-Type: application/json" \
         -d '{"amount": 100, "currency": "LKR"}'
    ```

### Test Cases

[](#test-cases)

- ✅ Payment method selection
- ✅ Payment URL generation
- ✅ Successful payment processing
- ✅ Failed payment handling
- ✅ Webhook reception and processing
- ✅ Transaction status updates
- ✅ Signature validation
- ✅ Error handling and logging

🔧 Troubleshooting
-----------------

[](#-troubleshooting)

### Common Issues

[](#common-issues)

1. **Payment URL Not Generated**

    ```
    Issue: "Invalid response from payment gateway"
    Solution: Check API credentials and network connectivity

    ```
2. **Webhook Not Received**

    ```
    Issue: Payment status not updating automatically
    Solution: Verify webhook URL accessibility and firewall settings

    ```
3. **Signature Validation Failed**

    ```
    Issue: "Invalid payment signature"
    Solution: Ensure API key is correct and not truncated

    ```

### Debug Mode

[](#debug-mode)

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"
```

### Log Files

[](#log-files)

```
# Application logs
storage/logs/laravel.log

# Web server logs
/var/log/nginx/access.log
/var/log/nginx/error.log
```

📊 Database Schema
-----------------

[](#-database-schema)

### Transactions Table

[](#transactions-table)

```
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`)
);
```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please follow these steps:

1. **Fork the Repository**

    ```
    git fork https://github.com/thusithawijethunga/botble-genie-payment.git
    ```
2. **Create Feature Branch**

    ```
    git checkout -b feature/your-feature-name
    ```
3. **Make Changes**

    - Follow PSR-12 coding standards
    - Add unit tests for new features
    - Update documentation
4. **Submit Pull Request**

    - Ensure all tests pass
    - Provide clear description of changes
    - Reference any related issues

### Development Setup

[](#development-setup)

```
# 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
```

📝 Changelog
-----------

[](#-changelog)

### Version 1.0.0 (2024-01-01)

[](#version-100-2024-01-01)

- ✨ Initial release
- ✨ Complete payment gateway integration
- ✨ Webhook support
- ✨ Transaction management
- ✨ Admin dashboard integration
- ✨ Multi-currency support
- ✨ Comprehensive logging
- ✨ Sandbox environment support

### Planned Features

[](#planned-features)

- 🔄 Automated refund processing
- 📊 Advanced analytics dashboard
- 🌐 Multi-language support
- 📱 Mobile app integration
- 💼 Merchant dashboard enhancements

📄 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](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.

```

🆘 Support
---------

[](#-support)

### Technical Support

[](#technical-support)

- **Email**:
- **Phone**: +94 722 983 616
- **Hours**: Monday - Friday, 9:00 AM - 6:00 PM (GMT+5:30)

### General Inquiries

[](#general-inquiries)

- **Email**:
- **Phone**: 076 076 0760

### Documentation &amp; Resources

[](#documentation--resources)

- **API Documentation**:
- **Merchant Dashboard**:
- **Botble CMS**:

### Community

[](#community)

- **Issues**: [GitHub Issues](https://github.com/thusithawijethunga/botble-genie-payment/issues)
- **Discussions**: [GitHub Discussions](https://github.com/thusithawijethunga/botble-genie-payment/discussions)
- **Discord**: [Botble Community](https://discord.gg/botble)

🏢 About
-------

[](#-about)

**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](https://geniebiz.lk) • [📧 Email](mailto:genie.integration@dialog.lk) • [📱 Download App](https://geniebiz.lk/download)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb7fe3b4d36660c25181cafb53142dbbdaa460859042eacb8af21421525e53b0?d=identicon)[thusithawijethunga](/maintainers/thusithawijethunga)

---

Top Contributors

[![thusithawijethunga](https://avatars.githubusercontent.com/u/5456955?v=4)](https://github.com/thusithawijethunga "thusithawijethunga (2 commits)")[![AppJUK](https://avatars.githubusercontent.com/u/213098904?v=4)](https://github.com/AppJUK "AppJUK (1 commits)")

---

Tags

botble-cmsbusiness-payment-gatewaygatewaygenieipgpaymentlaravelcmspaymentgatewayvisamastercardbotblesri-lankagenie

### Embed Badge

![Health badge](/badges/byheartlk-botble-genie-payment/health.svg)

```
[![Health](https://phpackages.com/badges/byheartlk-botble-genie-payment/health.svg)](https://phpackages.com/packages/byheartlk-botble-genie-payment)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[evryn/laravel-toman

A simple stable Laravel package to handle popular payment gateways in Iran including ZarinPal and IDPay.

1079.9k](/packages/evryn-laravel-toman)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
