|
Los
arhivos del código fuente, así como el manual del
usuario pueden descargarse gratuitamente en la sección de
Soporte
Técnico de este sitio.
A
continuación podrá encontrar el código fuente de la
aplicación que se incluye en el SDK APS Master Interface,
en esta aplicación se especifica la cantidad que se desea
cobrar manualmente en el textbox
"amountToPay.Text" y luego se presiona el botón
de "Pay". La aplicación efectuará el cobro y
posteriormente regresará al estado de espera.
| Option Explicit |
Private Sub Form_Load()
Dim InitEngine As Double
' Open APS Master Interface Engine
' This Engine will perform all the functions and communication between your computer and
' the payment systems: Bill Validator and/or Coin Acceptor
' If you want to debug your application, you can ommit the /hide parameter to view the
' APS Master Interface Engine Console.
InitEngine = Shell("APS_Master_Interface_Engine.exe /hide", 1)
' Reset "Regedit" variables
' These variables are used to communicate your application with the APS Master Interface Engine
SaveSetting "APS", "Status", "Due", "0"
SaveSetting "APS", "Status", "Credit", "0"
SaveSetting "APS", "Status", "Status", ""
SaveSetting "APS", "Status", "Cancel", ""
SaveSetting "APS", "Status", "Exit", ""
display.Caption = Format(0, "currency")
status.Caption = ""
due.Caption = "DUE AMOUNT: " & Format(0, "currency")
End Sub |
Private Sub Form_Terminate()
SaveSetting "APS", "Status", "Exit", "1"
End Sub |
Private Sub Pay_Click()
If Pay.Caption = "Pay" Then
SaveSetting "APS", "Status", "Due", Val(amountToPay.Text)
Timer1.Enabled = True
Pay.Caption = "Cancel"
Else
Pay.Caption = "Pay"
SaveSetting "APS", "Status", "Cancel", "1"
display.Caption = Format(0, "currency")
status.Caption = ""
due.Caption = "DUE AMOUNT: " & Format(0, "currency")
Timer1.Enabled = False
End If
End Sub |
Private Sub Timer1_Timer()
display.Caption = Format(Val(GetSetting("APS", "Status", "credit", "")), "currency")
due.Caption = "DUE AMOUNT: " & Format(Val(GetSetting("APS", "Status", "due", "")), "currency")
status.Caption = GetSetting("APS", "Status", "Status", "")
If Val(GetSetting("APS", "Status", "due", "")) <= 0 Then
Timer1.Enabled = False
Pay.Caption = "Pay"
End If
End Sub |
|