Hello All,
i am writing an application (B4J) to send payment to a Ingenico atm Terminal (PinPAD)
I send the comand to pay, for instance 2.80 € and the ATM respondes by placing that value in the visor and asking for the card.
STRING TO SEND TO The ATM : S00000028000000000000000000000000
so far so good, then I cancel ou finish the operation in the PinPAD and I receive the propper data in B4J
But if I try to do another payment, i get a wrong amount size in the pinpad's reply and cancels the operation.
I talked to the uys in the ATM factory and they say that i have to clear the buffer beetween comms. or to send a byte with 0 at the end of the comms.
It is clearly a buffer problem, because if i close the App and restart it the ATM works well again.
Any suggestions ?
how can i clear the Outputstream ? or how can i send the byte with 0 in the data to send.
Thanks
i am writing an application (B4J) to send payment to a Ingenico atm Terminal (PinPAD)
I send the comand to pay, for instance 2.80 € and the ATM respondes by placing that value in the visor and asking for the card.
STRING TO SEND TO The ATM : S00000028000000000000000000000000
so far so good, then I cancel ou finish the operation in the PinPAD and I receive the propper data in B4J
But if I try to do another payment, i get a wrong amount size in the pinpad's reply and cancels the operation.
I talked to the uys in the ATM factory and they say that i have to clear the buffer beetween comms. or to send a byte with 0 at the end of the comms.
It is clearly a buffer problem, because if i close the App and restart it the ATM works well again.
Any suggestions ?
how can i clear the Outputstream ? or how can i send the byte with 0 in the data to send.
B4X:
FirstChar="S"
Service="0"
Dim Amount2Pay As String = NumberFormat2(TotalPayment,1,2,2,False)
Dim Line2Send As String =$"${FirstChar}${Service}${Amount2Pay}${DummyString}"$
Log("MB:" & Line2Send)
Dim Data() As Byte
Data = Line2Send.GetBytes("UTF8")
If MB_Status = True Then
MB_InOut.Write(Data) ' MB_InOut is the AsynStreams object
End If
Thanks