Detect declined sessions (200 + Status:Error); theme Sessions screen
- startParkingSession: server returns HTTP 200 even on a declined charge — now detect Response.Status:"Error" and throw the gateway reason (e.g. "DECLINED") so the app shows the failure instead of a false "Parked!" - Confirmed the session request format is correct (server processed it); expand StartParkingSessionResponse with the real fields (OriginalErrorMessage, etc.) - Theme SessionsScreen (was black-on-black in dark mode) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7ec7ae9200
commit
1c597ec471
3 changed files with 52 additions and 22 deletions
|
|
@ -452,8 +452,29 @@ export interface StartParkingSessionParams {
|
|||
bleEncBytes?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/Session. CONFIRMED via live capture. Returns HTTP 200 even on a
|
||||
* declined charge — check `Response.Status === 'Error'` (the client does this and
|
||||
* throws). `OriginalErrorMessage` carries the gateway reason (e.g. "DECLINED").
|
||||
*/
|
||||
export interface StartParkingSessionResponse {
|
||||
BleEncBytes?: string;
|
||||
Response?: ResponseEnvelope;
|
||||
BleEncBytes?: string | null;
|
||||
PBPParkingSessionId?: number;
|
||||
OriginalErrorMessage?: string;
|
||||
StartTime?: string | null;
|
||||
EndTime?: string | null;
|
||||
TimePurchased?: string | null;
|
||||
ZoneID?: number | string | null;
|
||||
Zone?: string | null;
|
||||
SpaceID?: number | string | null;
|
||||
Space?: string | null;
|
||||
VehicleNumber?: string | null;
|
||||
Lat?: number | null;
|
||||
Long?: number | null;
|
||||
TransactionFee?: string | number | null;
|
||||
Amount?: string | number | null;
|
||||
AmountCharged?: string | number | null;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue