定制 aungmyokyaw/lapakgaming 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aungmyokyaw/lapakgaming

Composer 安装命令:

composer require aungmyokyaw/lapakgaming

包简介

Laravel package for LapakGaming Reseller API integration

README 文档

README

Laravel package for LapakGaming Reseller API integration.

About

This package provides a simple and efficient method to integrate with LapakGaming Reseller API using Laravel. It supports all major operations including product management, order creation, and balance checking.

Installation

composer require aungmyokyaw/lapakgaming

Configuration

You will need to publish the configuration file to your application:

php artisan vendor:publish --tag="lapakgaming-config"

After publishing, you will find the configuration file at config/lapakgaming.php. Fill out the necessary data:

  • api_key: Your LapakGaming API Secret Key
  • environment: 'development' or 'production'
  • callback_url: Your webhook callback URL (optional)

Usage Examples

Get Categories

$categories = LapakGaming::getCategories();

Get Products

Get Products by Category

// Get all products in a category
$products = LapakGaming::getProductsByCategory('VAL');

// Get products in category for specific country
$products = LapakGaming::getProductsByCategory('VAL', 'id');

Get Products by Product Code

// Get products by product code
$products = LapakGaming::getProductsByCode('VAL1650-S14');

// Get products by code for specific country
$products = LapakGaming::getProductsByCode('VAL1650-S14', 'my');

Get Products with Both Filters

// Filter by both category and product code
$products = LapakGaming::getProductsByCategoryAndCode('VAL', 'VAL1650-S14', 'id');

Get All Products

$allProducts = LapakGaming::getAllProducts();

Get Best Products

Get Best Products by Category

// Get best products by category
$bestProducts = LapakGaming::getBestProductsByCategory('ML');

// Get best products by category for specific country
$bestProducts = LapakGaming::getBestProductsByCategory('ML', 'id');

Get Best Products by Group Product Code

// Get best products by group product code
$bestProducts = LapakGaming::getBestProductsByGroupCode('ML1288_166');

// Get best products by group code for specific country
$bestProducts = LapakGaming::getBestProductsByGroupCode('ML1288_166', 'my');

Get Best Products with Both Filters

// Filter by both category and group product code
$bestProducts = LapakGaming::getBestProductsByCategoryAndGroupCode('ML', 'ML1288_166', 'id');

Get Balance

$balance = LapakGaming::getBalance();

Order

Basic Order with Product Code

// Simplest order - quantity defaults to 1
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789') // Game User ID
                   ->createOrder();

Order with Zone/Server Information

// For games requiring zone or server ID
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789', '2345') // User ID + Zone/Server ID
                   ->createOrder();

Order with Complete Additional Information

// For games requiring username
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789', '2345', 'additional_information') // User ID + Zone + Username
                   ->createOrder();

Order with Price Validation

// Validate price to prevent order if price changed
$order = LapakGaming::setProduct('ML78_8-S2', 15000) // Product code + expected price
                   ->setUser('123456789', '2345', 'additional_information')
                   ->createOrder();

Order with Custom Quantity

// Order multiple items
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789')
                   ->setQuantity(5) // Order 5 items
                   ->createOrder();

Order with Country Code

// Specify country for the order
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789')
                   ->setCountryCode('my') // Malaysia
                   ->createOrder();

Order with Login Game Details

// For games requiring login credentials
$order = LapakGaming::setProduct('LOGIN_GAME_PRODUCT')
                   ->setUser('123456789')
                   ->setOrderDetail('Password : mypass123 Nickname : PlayerOne Security code : 9876')
                   ->createOrder();

Order with Idempotency Protection

// Prevent duplicate orders with unique reference ID
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789')
                   ->setPartnerReferenceId('order-' . time()) // Unique reference
                   ->createOrder();

Order with Custom Callback URL

// Override default callback URL for this order
$order = LapakGaming::setProduct('ML78_8-S2')
                   ->setUser('123456789')
                   ->setCallbackUrl('https://yoursite.com/custom-callback') // Custom callback
                   ->createOrder();

Order using Group Product

// Order using group product instead of specific product code
$order = LapakGaming::setGroupProduct('mobile-legends')
                   ->setUser('123456789', '2345')
                   ->setCountryCode('id') // Indonesia
                   ->createOrder();

Complete Advanced Order

// Order with all possible parameters
$order = LapakGaming::setProduct('ML78_8-S2', 15000) // Product + price validation
                   ->setUser('123456789', '2345', 'additional_information') // Complete user info
                   ->setQuantity(2) // Multiple items
                   ->setCountryCode('my') // Malaysia
                   ->setOrderDetail('Password : 123 Nickname : nick Security code : 1234') // Login details
                   ->setPartnerReferenceId('unique-order-' . time()) // Idempotency
                   ->setCallbackUrl('https://yoursite.com/lapakgaming/callback') // Custom callback
                   ->createOrder();

Parameter Usage Summary

Method Parameter Required Example
setProduct() product_code, price product_code required setProduct('ML78_8-S2', 15000)
setGroupProduct() group_product, country group_product required setGroupProduct('mobile-legends', 'id')
setUser() user_id, additional_id, additional_info user_id for most games setUser('123456789', '2345', 'additional_information')
setQuantity() count_order optional (default: 1) setQuantity(5)
setCountryCode() country_code optional setCountryCode('my')
setOrderDetail() orderdetail optional setOrderDetail('Password : 123')
setPartnerReferenceId() partner_reference_id optional setPartnerReferenceId('unique-123')
setCallbackUrl() override_callback_url optional setCallbackUrl('https://site.com/cb')

Order Parameters Explained

Based on LapakGaming API documentation, here are all the parameters you can use when creating orders:

Required Parameters

Product Identification (Choose One)

  • product_code: Specific product code from getProductsByCategory() or getProductsByCode()
  • group_product: Group product code from getBestProductsByCategory() or getBestProductsByGroupCode()

Order Quantity

  • count_order: Number of items to order (defaults to 1)

Optional Parameters

User Information (Game-specific)

  • user_id: Game User ID (required for most games, optional for vouchers)
  • additional_id: Zone ID or Server ID (required for some games)
  • additional_information: Username ID (required for some games)

Login Game Details

  • orderdetail: Detailed information for games requiring login credentials
    • Example: "Password : 123 Nickname : nick ingame Security code : 1234"

Validation & Control

  • price: Price validation to prevent order if price changed
  • country_code: Country specification (optional, default: 'id')
  • partner_reference_id: Unique identifier to prevent duplicate orders
  • override_callback_url: Custom callback URL for this order

Order Status

Check Status by Transaction ID

// Check by transaction ID (tid)
$status = LapakGaming::checkOrderStatusByTid('RA171341142175668140');

Check Status by Partner Reference ID

// Check by partner reference ID
$status = LapakGaming::checkOrderStatusByRefId('R123');

Check Status with Both Parameters

// Check with both transaction ID and partner reference ID
$status = LapakGaming::checkOrderStatusByTidAndRefId('RA171341142175668140', 'R123');

Check Status with Flexible Parameters

// Check by transaction ID only
$status = LapakGaming::checkOrderStatusBy('RA171341142175668140');

// Check by partner reference ID only
$status = LapakGaming::checkOrderStatusBy(null, 'R123');

// Check by both
$status = LapakGaming::checkOrderStatusBy('RA171341142175668140', 'R123');

Supported Country Codes

When using group products or country-specific operations, use these country codes:

  • id - Indonesia (default)
  • my - Malaysia
  • ph - Philippines
  • th - Thailand
  • us - United States
  • br - Brazil
  • vn - Vietnam

License

MIT License

aungmyokyaw/lapakgaming 适用场景与选型建议

aungmyokyaw/lapakgaming 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「gaming」 「reseller」 「Topup」 「lapakgaming」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 aungmyokyaw/lapakgaming 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aungmyokyaw/lapakgaming 我们能提供哪些服务?
定制开发 / 二次开发

基于 aungmyokyaw/lapakgaming 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 30
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-26