taobin_project/inter/aus/xml/page_member_topup.lxml
2025-03-10 11:16:30 +07:00

611 lines
14 KiB
Text

<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
; On open
Var TargetTimeout = 30
Var Timeout = 0
Var BlurBackgroundState = "Invisible"
Var SelectOptionPopupState = "Invisible"
Var SelectedPaymentMedthod = ""
Var SumCreditAmount = TaobinCredit
Var CashlessPayFlag = 0
Var LOADING_STATE = "Invisible"
Var alphaState = "Invisible"
Var PayAmount = 0
Var AdditionalAmount = 0
Var ChangeOK = 0
Var QRCODE99 = ""
Var QRCODEImageState = "Invisible"
Var CancelButtonPaymentPopupState = "Invisible"
Var CancelingState = 0
Var CancelingTime = 0
Var ReqPayInfoFlag = 0
Var WaitQRPay = 0
Var QRErrorState = "Invisible"
Var DirImage = "ROOT/taobin_project/image/page_payment_en/page_payment"
Var DirImage2 = "ROOT/taobin_project/inter/aus/image/page_member_topup"
Var page_doing_show_time_image = "ROOT/taobin_project/image/page_doing/img2.png"
Var show_btp = "ROOT/taobin_project/image/bn_thai_lang_press.png"
Var show_btn = "ROOT/taobin_project/image/bn_thai_lang.png"
Var text_4 = "/text_4-AUS.png"
Var OptionAmount1 = 2900
Var OptionAmount2 = 3900
Var OptionAmount3 = 4900
Var AmountAdditionCredit1 = 0
Var AmountAdditionCredit2 = 0
Var AmountAdditionCredit3 = 0
; Enable / Disable promotion additional credit
Var PromotionAdditionCredit = 1
If PromotionAdditionCredit = 1 Then
Var AmountAdditionCredit1 = 300
Var AmountAdditionCredit2 = 500
Var AmountAdditionCredit3 = 800
EndIf
INT TaobinCredit
Var TaobinCreditStr !assigned StringFmt( TaobinCredit, DisplayFormat, PreScaleConvertShow )
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
If Timeout > TargetTimeout Then
Var alphaState = "Invisible"
Var LOADING_STATE = "Invisible"
Var QRErrorState = "Invisible"
If CashlessPayFlag = 1 Then
Var CashlessPayFlag = 0
CashlessReq FAIL ""
Else
CashlessReq OFF ""
EndIf
VendingQR OFF
Var CheckMemberPage2 = CountryRootPath + "xml/page_check_member2.lxml"
Open CheckMemberPage2
EndIf
If CancelingState = 1 Then
Var CancelingTime = CancelingTime + 1
If CancelingTime > 3 Then
Var Timeout = 0
Var TargetTimeout = 30
Var alphaState = "Invisible"
Var LOADING_STATE = "Invisible"
Var BlurBackgroundState = "Invisible"
Var CancelingState = 0
EndIf
EndIf
TimerReset
Refresh
</EventTimeout>
<EventSecurity>
Open "/media/bt/xml/security_alarm.xml"
</EventSecurity>
<EventActionOk>
If WaitQRPay = 1 Then
If VendingExtResult = "" Then
Else
Var PayCreditChannel = "qr_code"
Var ToppupSuccessPage = CountryRootPath + "xml/page_member_topupSuccess.lxml"
Open ToppupSuccessPage
EndIf
Var ReqPayInfoFlag = 0
EndIf
If ReqPayInfoFlag = 1 Then
Var VendingQRTypeResult = ""
DEBUGVAR ECommerceQR
SPLIT ECommerceQR "/" 5 VendingQRTypeResult
If VendingQRTypeResult = "FZB:2" Then
Var CashTextWarning = ""
Var QRErrorState = "Invisible"
Var QRCODE99FZB = SessionID
Var QRCODE99FZB = QRCODE99FZB + Ext1a
SAVELOG Ext1a
SAVELOG QRCODE99FZB
Var QRCODE99FZB = QRCODE99FZB + Ext21
Var QRCODETMP = QRCODE99FZB
Var ReqPayInfoFlag = 0
SAVELOG QRCODE99FZB
SAVELOG Ext21
Var QRCODE99 = QRCODE99FZB
Var LOADING_STATE = "Invisible"
Var WaitQRPay = 1
Var TargetTimeout = 120
Var Timeout = 0
Var VendingExtResult = ""
PlayLong "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Please_scan_to_pay_via_mobile.mp3"
Refresh
EndIf
EndIf
If VendingCashless = "OK" Then
CashlessReq SUCCESS ""
Var PayCreditChannel = "credit-card"
Var ToppupSuccessPage = CountryRootPath + "xml/page_member_topupSuccess.lxml"
Open ToppupSuccessPage
EndIf
</EventActionOk>
<EventActionError>
If VendingCashless = "ERROR" Then
Var TargetTimeout = 30
Var Timeout = 0
;Var QRErrorFlag = 1
If alphaState = "Enable" Then
Var QRErrorState = "Enable"
Var LOADING_STATE = "Invisible"
EndIf
CashlessReq FAIL ""
EndIf
If ReqPayInfoFlag > 0 Then
Var TargetTimeout = 30
Var Timeout = 0
Var QRErrorFlag = 1
If alphaState = "Enable" Then
Var QRErrorState = "Enable"
Var QRCODE99 = ""
EndIf
EndIf
Refresh
</EventActionError>
<EventCashlessCard>
Var CreditCardRef = ""
GenHashWithTimeStamp CreditCardRef
DEBUGVAR VendingCashless
If VendingCashless = "READY" Then
Var Timeout = 0
Var QRErrorState = "Invisible"
Var QR_POPUP = "/img_popup8-2.png"
Var VendingCashless = "-"
Var LOADING_STATE = "Enable"
Var alphaState = "Enable"
Var TopupAmount = PayAmount
Var PromoAmount = AdditionalAmount
CashlessPayV2 TopupAmount CreditCardRef PromoAmount
Var CashlessPayFlag = 1
EndIf
Refresh
</EventCashlessCard>
;include="ROOT/taobin_project/inc/video.inc"
<Text>
<X> 70 </X>
<Y> 499 </Y>
<Width> 940 </Width>
<Font> MontserratBold </Font>
<Size> 50 </Size>
<Color> 0x513C2F </Color>
<Align> Center </Align>
<Value> "Choose a payment method" </Value>
</Text>
<Button>
<X> 287 </X>
<Y> 637 </Y>
<Filename> Var( DirImage2 + "/bn_credit_card.png" ) </Filename>
<FilenamePress> Var( DirImage2 + "/bp_credit_card.png" ) </FilenamePress>
<FilenameDisable> Var( DirImage2 + "/bd_credit_card.png" ) </FilenameDisable>
<EventOnClick>
Var Timeout = 0
Var SelectedPaymentMedthod = "credit_card"
Var SelectOptionPopupState = "Enable"
Var BlurBackgroundState = "Enable"
</EventOnClick>
</Button>
<Button>
<X> 287 </X>
<Y> 778 </Y>
<Filename> Var( DirImage2 + "/bn_qr_code.png" ) </Filename>
<FilenamePress> Var( DirImage2 + "/bp_qr_code.png" ) </FilenamePress>
<FilenameDisable> Var( DirImage2 + "/bd_qr_code.png" ) </FilenameDisable>
<EventOnClick>
Var Timeout = 0
Var SelectedPaymentMedthod = "qr_code"
Var SelectOptionPopupState = "Enable"
Var BlurBackgroundState = "Enable"
</EventOnClick>
</Button>
<Text>
<X> 70 </X>
<Y> 1134 </Y>
<Width> 940 </Width>
<Font> MontserratBold </Font>
<Size> 64 </Size>
<Color> 0x513C2F </Color>
<Align> Center </Align>
<Value> "Total balance" </Value>
</Text>
<Image>
<X> 252 </X>
<Y> 1272 </Y>
<Filename> Var( DirImage + text_4 )</Filename>
</Image>
<Text>
<X> 252 </X>
<Y> 1300 </Y>
<Size> 144 </Size>
<Align> Center </Align>
<Width> 566 </Width>
<Font> KanitRegularTTF </Font>
<Color> 0xDE794E </Color>
<Value> TaobinCreditStr </Value>
</Text>
<Button>
<X> 397 </X>
<Y> 1622 </Y>
<Filename> Var( DirImage + "/bn_cancel2.png" )</Filename>
<FilenamePress> Var( DirImage + "/bp_cancel2.png" )</FilenamePress>
<EventClick>
Var CheckMemberPage2 = CountryRootPath + "xml/page_check_member2.lxml"
Open CheckMemberPage2
</EventClick>
</Button>
<Image>
<X> 0 </X>
<Y> 380 </Y>
<State> BlurBackgroundState </State>
<Filename> "ROOT/taobin_project/image/page_payment/alpha.png" </Filename>
</Image>
; ================= select option =================
<Image>
<X> 213 </X>
<Y> 653 </Y>
<State> SelectOptionPopupState </State>
<Filename> Var( DirImage2 + "/popup_option_bg.png" ) </Filename>
</Image>
<Text>
<X> 249 </X>
<Y> 710 </Y>
<State> SelectOptionPopupState </State>
<Width> 583 </Width>
<Font> KanitSemiBold </Font>
<Size> 41 </Size>
<Color> 0x513C2F </Color>
<Align> Center </Align>
<Value> "Please Select Option" </Value>
</Text>
<Button>
<X> 287 </X>
<Y> 836 </Y>
<State> SelectOptionPopupState </State>
<Filename> Var( DirImage2 + "/bn_topup_credit_option_29.png") </Filename>
<FilenamePress> Var( DirImage2 + "/bp_topup_credit_option_29.png") </FilenamePress>
<FilenameDisable> Var( DirImage2 + "/bd_topup_credit_option_29.png") </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var PayAmount = OptionAmount1
Var Timeout = 0
If PromotionAdditionCredit = 1 Then
Var AdditionalAmount = AmountAdditionCredit1
EndIf
Function 2
</EventClick>
</Button>
<Button>
<X> 287 </X>
<Y> 991 </Y>
<State> SelectOptionPopupState </State>
<Filename> Var( DirImage2 + "/bn_topup_credit_option_39.png") </Filename>
<FilenamePress> Var( DirImage2 + "/bp_topup_credit_option_39.png") </FilenamePress>
<FilenameDisable> Var( DirImage2 + "/bd_topup_credit_option_39.png") </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var PayAmount = OptionAmount2
Var Timeout = 0
If PromotionAdditionCredit = 1 Then
Var AdditionalAmount = AmountAdditionCredit2
EndIf
Function 2
</EventClick>
</Button>
<Button>
<X> 287 </X>
<Y> 1146 </Y>
<State> SelectOptionPopupState </State>
<Filename> Var( DirImage2 + "/bn_topup_credit_option_49.png") </Filename>
<FilenamePress> Var( DirImage2 + "/bp_topup_credit_option_49.png") </FilenamePress>
<FilenameDisable> Var( DirImage2 + "/bd_topup_credit_option_49.png") </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var PayAmount = OptionAmount3
Var Timeout = 0
If PromotionAdditionCredit = 1 Then
Var AdditionalAmount = AmountAdditionCredit3
EndIf
Function 2
</EventClick>
</Button>
<Button>
<X> 438 </X>
<Y> 1345 </Y>
<State> SelectOptionPopupState </State>
<Filename> Var( DirImage + "/bn_cancel.png" )</Filename>
<FilenamePress> Var( DirImage + "/bp_cancel.png" )</FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var SelectedPaymentMedthod = ""
Var SelectOptionPopupState = "Invisible"
Var BlurBackgroundState = "Invisible"
Refresh
</EventClick>
</Button>
; ================ checkout ===========================
<Image>
<X> 249 </X>
<Y> 748 </Y>
<State> alphaState </State>
<Filename> Var( DirImage + QR_POPUP )</Filename>
</Image>
<Text>
<X> 267 </X>
<Y> 1065 </Y>
<State> LOADING_STATE </State>
<Width> 546 </Width>
<Height> 75 </Height>
<Font> NotoSansThaiBold </Font>
<Size> 58 </Size>
<Color> 0x5A5A5A </Color>
<Value> LOADING_TEXT </Value>
<Align> center-vertical-horizontal </Align>
</Text>
<GIF>
<X> 493 </X>
<Y> 968 </Y>
<Width> 94 </Width>
<Height> 94 </Height>
<State> LOADING_STATE </State>
<Filename> Var( DirImage + "/loading.gif" )</Filename>
</GIF>
<Button>
<X> 438 </X>
<Y> 1365 </Y>
<State> CancelButtonPaymentPopupState </State>
<Filename> Var( DirImage + "/bn_cancel.png" )</Filename>
<FilenamePress> Var( DirImage + "/bp_cancel.png" )</FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var LOADING_STATE = "Enable"
Var QRErrorState = "Invisible"
Var CancelButtonPaymentPopupState = "Invisible"
Var QRCODEImageState = "Invisible"
Var QRCODE99 = ""
Var CancelingState = 1
Var CancelingTime = 0
Var LOADING_TEXT = "Canceling..."
If SelectedPaymentMedthod = "credit_card" Then
SAVELOG "Canceling credit card"
Var QR_POPUP = "/img_popup8-2.png"
CashlessReq OFF ""
If CashlessPayFlag = 1 Then
Var CashlessPayFlag = 0
CashlessReq FAIL ""
EndIf
EndIf
If SelectedPaymentMedthod = "qr_code" Then
SAVELOG "Canceling qr_code"
VendingQR OFF
EndIf
Refresh
</EventClick>
</Button>
<QRCode>
<X> 415 </X>
<Y> 975 </Y>
<Width> 250 </Width>
<Height> 250 </Height>
<State> QRCODEImageState </State>
<Service> testservice </Service>
</QRCode>
<Button>
<X> 267 </X>
<Y> 960 </Y>
<State>QRErrorState</State>
<Filename> Var( DirImage + "/QRError.png" ) </Filename>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
</EventClick>
</Button>
<Function2>
Var SelectOptionPopupState = "Invisible"
Var alphaState = "Enable"
Var CancelButtonPaymentPopupState = "Enable"
if SelectedPaymentMedthod = "credit_card" Then
Var QR_POPUP = "/img_popup8-AUS.png"
Coin CARD
EndIf
if SelectedPaymentMedthod = "qr_code" Then
Var QR_POPUP = "/img_popup1-AUS.png"
Var LOADING_TEXT = "Just Moment Please"
Var LOADING_STATE = "Enable"
Var QRCODEImageState = "Enable"
VendingQR ON
Var QRCODE99 = ""
Var PriceDrink = PayAmount
Var DiscountDrink = 0
Var SelectDrink = "00-00-00-0000"
Var SelectSlot = "1"
Var QRCODE1 = "A000000677010112"
Var QRCODE2 = "010755600066301"
Var QRCODE3 = "VDGN"
Var QRCODE4 = BoxID
Var QRCODE5 = SelectSlot
Var QRCODE6 = SelectDrink
Var QRCODE7 = PriceDrink
Var QRCODE8 = ""
Var SessionID2 = "00" + ":"
Var SessionID2 = SessionID2 + ""
Var CreditAmount1 = ""
Var ServiceAmountFlow = ""
Var TelephoneNumberQR = "0899999999"
Var ServiceType = "coffee"
Var ECommerceQR = ""
Var ECommerceQR = ECommerceQR + PriceDrink
Var ECommerceQR = ECommerceQR + "/"
Var ECommerceQR = ECommerceQR + DiscountDrink
Var ECommerceQR = ECommerceQR + "/"
Var ECommerceQR = ECommerceQR + SessionID2
Var ECommerceQR = ECommerceQR + "/"
Var ECommerceQR = ECommerceQR + SelectDrink
Var ECommerceQR = ECommerceQR + "/"
Var ECommerceQR = ECommerceQR + "FZB:2/"
Var ECommerceQR = ECommerceQR + "CRX"
Var ECommerceQR = ECommerceQR + ":"
Var ECommerceQR = ECommerceQR + TelephoneNumber
Var ECommerceQR = ECommerceQR + ":0:"
Var ECommerceQR = ECommerceQR + AdditionalAmount
Var ServiceParameter = "max"
Var ServiceCharge = 0
Var AccountType = "new"
Var testservice = "kbank"
Var tc = ""
Var GetScore = ""
Var OperatorName = ""
Var SessionID = ""
GetPayInfo TelephoneNumberQR ECommerceQR ServiceType ServiceParameter SessionID OperatorName CreditAmount1 ServiceAmountFlow GetScore tc
Var ReqPayInfoFlag = 1
EndIf
Refresh
</Function2>
<EventUnitTest4>
Var MemberToppupSuccessPage = CountryRootPath + "xml/page_member_topupSuccess.lxml"
Open MemberToppupSuccessPage
</EventUnitTest4>
</Popup>