Hi,
I have a sub in my ISL script which calls a DLL and depending on the result returned from the DLL, should either exit out(cancel) the check, or complete the check transaction.
This sub is called from Event_Tender and looks like this-
// code start
DLLCall dll_handle,initiate_pin_recharge(Amount,Posid,@CKNUM,ItemNo,unlimiteduse,ref Output,ref CustUserID, ref TranDate,ref Product, ref StartDate,ref EndDate)
If Output=0
// Complete transaction and save additional data such as ProductID etc..
// The first dummy character is used in each case so that we can find the correct line later on
SaveChkInfo "!", CustUserID
SaveChkInfo "@", StartDate
SaveChkInfo "#", EndDate
SaveChkInfo "*", Product
SaveChkInfo "CC#", CreditAuthNum
EndIf
Else
ExitWithError "Not successful"
// code end
However, when I run this, even if I receive a success message, the DLL is being called again-how do I close the transaction successfully.
Second, when I receive a unsuccesful message also, the DLL is being called again and even if the message is unsuccessful for the second attempt, the bill is still being preinted-how do I exit out and cancel the transaction?
Any help would be great. I need to get this thig to work real soon, so somebody please help.
I have a sub in my ISL script which calls a DLL and depending on the result returned from the DLL, should either exit out(cancel) the check, or complete the check transaction.
This sub is called from Event_Tender and looks like this-
// code start
DLLCall dll_handle,initiate_pin_recharge(Amount,Posid,@CKNUM,ItemNo,unlimiteduse,ref Output,ref CustUserID, ref TranDate,ref Product, ref StartDate,ref EndDate)
If Output=0
// Complete transaction and save additional data such as ProductID etc..
// The first dummy character is used in each case so that we can find the correct line later on
SaveChkInfo "!", CustUserID
SaveChkInfo "@", StartDate
SaveChkInfo "#", EndDate
SaveChkInfo "*", Product
SaveChkInfo "CC#", CreditAuthNum
EndIf
Else
ExitWithError "Not successful"
// code end
However, when I run this, even if I receive a success message, the DLL is being called again-how do I close the transaction successfully.
Second, when I receive a unsuccesful message also, the DLL is being called again and even if the message is unsuccessful for the second attempt, the bill is still being preinted-how do I exit out and cancel the transaction?
Any help would be great. I need to get this thig to work real soon, so somebody please help.