npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lianlianpay-thailand-sdk

v1.0.0

Published

Node.js SDK for LianLian Pay (LLGP) payment gateway supporting all payment methods in Thailand

Readme

LianLianPay Thailand SDK

Node.js SDK สำหรับ LianLian Pay (LLGP) payment gateway ที่รองรับวิธีการชำระเงินทั้งหมดในประเทศไทย

คุณสมบัติ

  • วิธีการชำระเงิน: Checkout, Bankcard, Alipay, WeChat Pay, QR PromptPay, Mobile Banking, Line Pay, Shopee Pay, TrueMoney, Counter Pay
  • Payout: โอนเงินผ่านธนาคารและ TrueMoney
  • Refund: การคืนเงิน
  • ความปลอดภัย: RSA-SHA1 signing และ verification
  • TypeScript: รองรับ TypeScript เต็มรูปแบบ

การติดตั้ง

npm install lianlianpay-thailand-sdk

การตั้งค่า

  1. รับข้อมูลประจำตัว LianLian Pay

    • สมัครสมาชิกที่ LianLian Pay Thailand
    • ทำการยืนยันตัวตนของพ่อค้า
    • รับข้อมูลประจำตัว API ของคุณ
  2. กำหนดค่าข้อมูลประจำตัวของคุณ

    const { LLPayClient, LLPayConstant, CheckoutPayRequest, Customer } = require('lianlianpay-thailand-sdk');
       
    // เริ่มต้น client
    const client = new LLPayClient(
      false, // true สำหรับ production
      'your-merchant-private-key',
      'lianlian-public-key'
    );

เริ่มต้นใช้งาน

const { LLPayClient, LLPayConstant, CheckoutPayRequest, Customer } = require('lianlianpay-thailand-sdk');

// เริ่มต้น client
const client = new LLPayClient(
  false, // production environment
  'your-merchant-private-key',
  'lianlian-public-key'
);

// สร้างการชำระเงิน checkout
const checkoutRequest = {
  merchant_id: 'your-merchant-id',
  service: LLPayConstant.CHECKOUT_PAY_SERVICE,
  version: LLPayConstant.SERVICE_VERSION,
  merchant_order_id: 'ORDER_' + Date.now(),
  order_currency: 'THB',
  order_amount: '100.00',
  order_desc: 'Test payment',
  notify_url: 'https://your-domain.com/notify',
  redirect_url: 'https://your-domain.com/redirect',
  customer: {
    full_name: 'John Doe',
    merchant_user_id: 'user123'
  }
};

// ดำเนินการชำระเงิน
client.execute(checkoutRequest)
  .then(result => {
    if (result.code === 200000 && result.sign_verify) {
      console.log('Payment successful:', result.data);
    } else {
      console.error('Payment failed:', result);
    }
  })
  .catch(error => {
    console.error('Error:', error);
  });

ตัวอย่าง

ดูตัวอย่างการใช้งานในโฟลเดอร์ example/:

cd example
npm install
npm start

วิธีการชำระเงิน

การชำระเงินออนไลน์

  • Checkout Pay - ประตูการชำระเงินสากล
  • Bankcard Pay - บัตรเครดิต/เดบิต
  • Alipay Online - การรวม Alipay
  • WeChat Pay - การรวม WeChat Pay
  • QR PromptPay - การชำระเงิน QR code ไทย
  • Mobile Banking - แอปมือถือธนาคารไทย (KBank, SCB, Krungsri)
  • Line Pay - การรวม Line Pay
  • Shopee Pay - การรวม Shopee Pay
  • TrueMoney - กระเป๋าเงิน TrueMoney

การชำระเงินออฟไลน์

  • Alipay Offline - การสร้าง QR code
  • Counter Pay - การชำระเงินที่ร้านสะดวกซื้อ

บริการเพิ่มเติม

  • Payment Query - ตรวจสอบสถานะการชำระเงิน
  • Payout - โอนเงินผ่านธนาคารและ TrueMoney
  • Refund - การประมวลผลคืนเงิน

การอ้างอิง API

LLPayClient

คลาสหลักสำหรับการดำเนินการ LLGP ทั้งหมด

Constructor

new LLPayClient(productionEnv, merchantPrivateKey, lianLianPublicKey)
  • productionEnv (boolean): true สำหรับ production, false สำหรับ sandbox
  • merchantPrivateKey (string): RSA private key ของพ่อค้า
  • lianLianPublicKey (string): Public key ของ LLGP สำหรับการตรวจสอบลายเซ็น

Methods

  • execute(request): ดำเนินการคำขอการชำระเงิน/payout/refund ใดๆ

การสนับสนุนและเอกสาร

  • เอกสารอย่างเป็นทางการ: https://doc.lianlianpay.co.th/
  • การอ้างอิง API: https://doc.lianlianpay.co.th/docs/checkout
  • การสนับสนุน: ติดต่อการสนับสนุน LianLian Pay สำหรับปัญหาบัญชีพ่อค้า

ใบอนุญาต

MIT


LianLianPay Thailand SDK

Node.js SDK for LianLian Pay (LLGP) payment gateway supporting all payment methods in Thailand.

Features

  • Payment Methods: Checkout, Bankcard, Alipay, WeChat Pay, QR PromptPay, Mobile Banking, Line Pay, Shopee Pay, TrueMoney, Counter Pay
  • Payout: Bank transfer and TrueMoney payout
  • Refund: Payment refund processing
  • Security: RSA-SHA1 signing and verification
  • TypeScript: Full TypeScript support with type definitions

Installation

npm install lianlianpay-thailand-sdk

Setup

  1. Get LianLian Pay Credentials

  2. Configure Your Credentials

    const { LLPayClient, LLPayConstant, CheckoutPayRequest, Customer } = require('lianlianpay-thailand-sdk');
       
    // Initialize client
    const client = new LLPayClient(
      false, // true for production
      'your-merchant-private-key',
      'lianlian-public-key'
    );

Quick Start

const { LLPayClient, LLPayConstant, CheckoutPayRequest, Customer } = require('lianlianpay-thailand-sdk');

// Initialize client
const client = new LLPayClient(
  false, // production environment
  'your-merchant-private-key',
  'lianlian-public-key'
);

// Create checkout payment
const checkoutRequest = {
  merchant_id: 'your-merchant-id',
  service: LLPayConstant.CHECKOUT_PAY_SERVICE,
  version: LLPayConstant.SERVICE_VERSION,
  merchant_order_id: 'ORDER_' + Date.now(),
  order_currency: 'THB',
  order_amount: '100.00',
  order_desc: 'Test payment',
  notify_url: 'https://your-domain.com/notify',
  redirect_url: 'https://your-domain.com/redirect',
  customer: {
    full_name: 'John Doe',
    merchant_user_id: 'user123'
  }
};

// Execute payment
client.execute(checkoutRequest)
  .then(result => {
    if (result.code === 200000 && result.sign_verify) {
      console.log('Payment successful:', result.data);
    } else {
      console.error('Payment failed:', result);
    }
  })
  .catch(error => {
    console.error('Error:', error);
  });

Demo

Run the demo files to test different payment methods:

# Test payment methods
npm test

# Run example
npm run example

API Reference

LLPayClient

Main client class for all LLGP operations.

Constructor

new LLPayClient(productionEnv, merchantPrivateKey, lianLianPublicKey)
  • productionEnv (boolean): true for production, false for sandbox
  • merchantPrivateKey (string): Your merchant RSA private key
  • lianLianPublicKey (string): LLGP public key for signature verification

Methods

  • execute(request): Execute any payment/payout/refund request

Payment Methods

Checkout Pay

Universal payment gateway supporting multiple payment methods.

Bankcard Pay

Direct credit/debit card payments.

Alipay Online/Offline

Alipay integration for online and offline payments.

WeChat Pay

WeChat Pay integration.

QR PromptPay

Thai QR code payments.

Mobile Banking

Thai bank mobile app payments (KBank, SCB, Krungsri).

Line Pay

Line Pay integration.

Shopee Pay

Shopee Pay integration.

TrueMoney

TrueMoney wallet payments.

Counter Pay

Counter payment at convenience stores.

Support & Documentation

  • Official Documentation: https://doc.lianlianpay.co.th/
  • API Reference: https://doc.lianlianpay.co.th/docs/checkout
  • Support: Contact LianLian Pay support for merchant account issues

License

MIT