handler pay offline mode

This commit is contained in:
miggaze 2021-03-26 14:14:04 +07:00
parent b8b768a500
commit c2c3c540ec
6 changed files with 182 additions and 30 deletions

View file

@ -230,10 +230,17 @@
Var EnoughChange = "yes"
If NetworkStatus = "DOWN" Then
Var PayState2 = "Disable"
Var PayState3 = "Disable"
Var PayState4 = "Disable"
Var PayOfflineMode = 1
Else
Var PayOfflineMode = 0
EndIf
</EventOpen>
@ -501,29 +508,36 @@
Var CoinInFlag = 1
If ViewBill > 0 Then
Var RemainAmount = PayAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCampaign
If ViewBill > RemainAmount Then
Var RemainAmountKeep = ViewBill - RemainAmount
If PayOfflineMode = 1 Then
CoinVending BILLREJECT
Else
Var RemainAmountKeep = ViewBill
Var RemainAmount = PayAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCampaign
If ViewBill > RemainAmount Then
Var RemainAmountKeep = ViewBill - RemainAmount
Else
Var RemainAmountKeep = ViewBill
EndIf
Var Timeout = 0
Var RemainAmountStr = "" + RemainAmount
Var showRemaining = charOfBaht + RemainAmountStr
Var alphaState3 = "Enable"
EndIf
Var Timeout = 0
Var RemainAmountStr = "" + RemainAmount
Var showRemaining = charOfBaht + RemainAmountStr
Var alphaState3 = "Enable"
Else