Fix open tab: accept AuthAmountCents from Android client

Android sends cents, server was reading dollars only, falling back to default $150.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-02-24 21:43:52 -08:00
parent 4c0479db5c
commit 9ed200d7ea

View file

@ -25,7 +25,12 @@ try {
userID = val(requestData.UserID ?: 0);
businessID = val(requestData.BusinessID ?: 0);
// Accept AuthAmount (dollars) or AuthAmountCents (cents)
if (structKeyExists(requestData, "AuthAmountCents") && val(requestData.AuthAmountCents) > 0) {
authAmount = val(requestData.AuthAmountCents) / 100;
} else {
authAmount = val(requestData.AuthAmount ?: 0);
}
servicePointID = val(requestData.ServicePointID ?: 0);
if (userID == 0) apiAbort({ "OK": false, "ERROR": "missing_UserID" });