PAY_SECURITY_FAIL

Support for the Milan Intelligent interface, sold by Money Controls as the Paylink USB unit and for the earlier PCI card version.

Moderators: aardvark, davebush, Admin

Post Reply
wes_psousa
Posts: 8
Joined: Fri Jan 18, 2008 5:01 pm

PAY_SECURITY_FAIL

Post by wes_psousa »

Hello.
I have noticed that sometimes while performing a payout and checking pay status it returns -8 PAY_SECURITY_FAIL. What does it mean?

Thank you very much for your attention.

This is the code I am running:
long
startOperation ()
{
printf("start operation\n");
long OpenStatus = OpenSpecificMHEVersion("AE000002",65538) ;

if (OpenStatus != 0)
printf("IMHEI open failed - %ld\n", OpenStatus) ;
else {
printf("check usb\n");
USBStatus usbStatus = USBDriverStatus();
printf("usbStatus %d\n", usbStatus);

printf("enable interface\n");
EnableInterface() ;
}
return OpenStatus;
}

void
PayCoins (long NoOfCoins)
{
if(startOperation() != 0) {
return;
}


PayOut(NoOfCoins * 100) ;
long status = LastPayStatus();
printf("paystatus %ld\n", status);


while (status == PAY_ONGOING) {
Sleep(10) ;
status = LastPayStatus();
}

status = LastPayStatus();
printf("paystatus %ld\n", status);
if (status != PAY_FINISHED)
printf("Error %ld when paying %ld coins\n", status, NoOfCoins) ;
else
printf("%ld coins paid out, Value %ld\n", NoOfCoins, CurrentPaid()) ;

printf("finish\n");
DisableInterface();
}
davebush
Posts: 492
Joined: Fri Oct 22, 2004 12:20 pm

Post by davebush »

This is related to your earlier post concerning USB problems.

If the USB system breaks down badly enough the two ends can loose synchronisation, resulting in this error. Normally if you wait 100msec and retry it will recover.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
Post Reply