fix(webhook): dukung variasi notifikasi ShopeePay
Some checks failed
CI / test (push) Has been cancelled

- kata 'ditambahkan'/'telah ditambahkan' dianggap pembayaran masuk
- regex nominal mendukung frasa tersebut
- versi 0.6.13
This commit is contained in:
oxpoe
2026-11-06 11:11:47 +07:00
parent 19096b36e3
commit e2ebc079f1
5 changed files with 12 additions and 6 deletions

View File

@@ -2,6 +2,11 @@
Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/). Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/).
## [0.6.13] — 2026-11-06 — "webhook-shopeepay"
### Diperbaiki
- Parser notifikasi pembayaran mendukung variasi **ShopeePay / Mitra Shopee** yang memakai kata “ditambahkan” / “telah ditambahkan”, tanpa mengubah aplikasi Android.
## [0.6.12] — 2026-11-06 — "acs-virtual" ## [0.6.12] — 2026-11-06 — "acs-virtual"
### Diperbaiki ### Diperbaiki

View File

@@ -11,7 +11,7 @@
<p align="center"> <p align="center">
<img src="https://img.shields.io/badge/lisensi-ISC-ADFF2F" alt="Lisensi: ISC"> <img src="https://img.shields.io/badge/lisensi-ISC-ADFF2F" alt="Lisensi: ISC">
<img src="https://img.shields.io/badge/versi-0.6.12_acs--virtual-ADFF2F" alt="Versi 0.6.12 (acs-virtual)"> <img src="https://img.shields.io/badge/versi-0.6.13_webhook--shopeepay-ADFF2F" alt="Versi 0.6.13 (webhook-shopeepay)">
<img src="https://img.shields.io/badge/Node.js-%E2%89%A520-339933" alt="Node.js >= 20"> <img src="https://img.shields.io/badge/Node.js-%E2%89%A520-339933" alt="Node.js >= 20">
<img src="https://img.shields.io/badge/docker-ready-2496ED?logo=docker&logoColor=white" alt="Docker"> <img src="https://img.shields.io/badge/docker-ready-2496ED?logo=docker&logoColor=white" alt="Docker">
<a href="https://demo-openisp.oxpoe.xyz"><img src="https://img.shields.io/badge/demo-live-ADFF2F?logo=googlechrome&logoColor=black" alt="Demo"></a> <a href="https://demo-openisp.oxpoe.xyz"><img src="https://img.shields.io/badge/demo-live-ADFF2F?logo=googlechrome&logoColor=black" alt="Demo"></a>

View File

@@ -387,7 +387,7 @@ function parseRupiahAmountFromNotification(content) {
'dana masuk', 'saldo masuk', 'saldo bertambah', 'berhasil top up', 'dana masuk', 'saldo masuk', 'saldo bertambah', 'berhasil top up',
'top up berhasil', 'topup berhasil', 'terima uang', 'telah diterima dari', 'top up berhasil', 'topup berhasil', 'terima uang', 'telah diterima dari',
'diterima dari', 'qris berhasil', 'qris sukses', 'qr berhasil', 'qr sukses', 'diterima dari', 'qris berhasil', 'qris sukses', 'qr berhasil', 'qr sukses',
'payment received', 'kamu menerima', 'berhasil menerima', 'menambahkan', 'payment received', 'kamu menerima', 'berhasil menerima', 'menambahkan', 'ditambahkan', 'telah ditambahkan', 'berhasil ditambahkan',
'telah diterima sebesar', 'uang diterima', 'menerima dana', 'dana diterima', 'menerima sebesar', 'baru saja menerima', 'telah menerima', 'telah diterima sebesar', 'uang diterima', 'menerima dana', 'dana diterima', 'menerima sebesar', 'baru saja menerima', 'telah menerima',
'just received', 'you received', 'you have received', 'funds received', 'has been received', 'incoming transfer', 'credited' 'just received', 'you received', 'you have received', 'funds received', 'has been received', 'incoming transfer', 'credited'
]; ];
@@ -410,7 +410,8 @@ function parseRupiahAmountFromNotification(content) {
'uang masuk', 'telah diterima', 'top up berhasil', 'topup berhasil', 'berhasil top up', 'uang masuk', 'telah diterima', 'top up berhasil', 'topup berhasil', 'berhasil top up',
'menerima pembayaran', 'qris statis diterima', 'qris diterima', 'pembayaran qris', 'menerima pembayaran', 'qris statis diterima', 'qris diterima', 'pembayaran qris',
'menerima dana', 'dana diterima', 'menerima sebesar', 'telah menerima', 'menerima dana', 'dana diterima', 'menerima sebesar', 'telah menerima',
'just received', 'you received', 'you have received', 'funds received', 'has been received' 'just received', 'you received', 'you have received', 'funds received', 'has been received',
'ditambahkan', 'telah ditambahkan', 'berhasil ditambahkan'
]; ];
const hasStrongIncoming = strongIncoming.some((hint) => lower.includes(hint)); const hasStrongIncoming = strongIncoming.some((hint) => lower.includes(hint));
@@ -427,7 +428,7 @@ function parseRupiahAmountFromNotification(content) {
const candidates = [ const candidates = [
/(?:\bRp\.?\s*|IDR\s*)([0-9][0-9\.\,\s]*)/i, /(?:\bRp\.?\s*|IDR\s*)([0-9][0-9\.\,\s]*)/i,
/(?:sebesar|senilai|nominal|masuk|transfer|top\s*up|topup|saldo\s+masuk)\s*(?:saldo\s*)?(?:\bRp\.?\s*)?([0-9][0-9\.\,\s]*)/i, /(?:sebesar|senilai|nominal|masuk|transfer|top\s*up|topup|saldo\s+masuk|ditambahkan)\s*(?:saldo\s*)?(?:\bRp\.?\s*)?([0-9][0-9\.\,\s]*)/i,
]; ];
let raw = null; let raw = null;

View File

@@ -1,6 +1,6 @@
{ {
"name": "open-isp", "name": "open-isp",
"version": "0.6.12", "version": "0.6.13",
"description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)", "description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)",
"main": "app-customer.js", "main": "app-customer.js",
"scripts": { "scripts": {

View File

@@ -1 +1 @@
0.6.12 0.6.13