@@ -40,7 +40,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
40
40
this .sentry = sentry
41
41
}
42
42
43
- private fun storeFailedCheckin (eventSlug : String , listId : Long , error_reason : String , raw_barcode : String , type : TicketCheckProvider .CheckInType , position : Long? = null, item : Long? = null, variation : Long? = null, subevent : Long? = null, nonce : String? ) {
43
+ private fun storeFailedCheckin (eventSlug : String , listId : Long , error_reason : String , raw_barcode : String , type : TicketCheckProvider .CheckInType , position : Long? = null, item : Long? = null, variation : Long? = null, subevent : Long? = null, nonce : String? , eventsAndCheckinLists : Set < Map . Entry < String , Long >> ? = null ) {
44
44
/*
45
45
:<json boolean error_reason: One of ``canceled``, ``invalid``, ``unpaid``, ``product``, ``rules``, ``revoked``,
46
46
``incomplete``, ``already_redeemed``, ``blocked``, ``invalid_time``, or ``error``. Required.
@@ -71,6 +71,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
71
71
if (item != null && item > 0 ) jdoc.put(" item" , item)
72
72
if (variation != null && variation > 0 ) jdoc.put(" variation" , variation)
73
73
if (subevent != null && subevent > 0 ) jdoc.put(" subevent" , subevent)
74
+ if (eventsAndCheckinLists != null ) jdoc.put(" events_and_checkin_lists" , eventsAndCheckinLists)
74
75
75
76
val qo = QueuedCall ()
76
77
val api = PretixApi .fromConfig(config) // todo: uses wrong http client
@@ -278,7 +279,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
278
279
}
279
280
if (decoded == null || event == null ) {
280
281
val firstentry = eventsAndCheckinLists.entries.first()
281
- storeFailedCheckin(firstentry.key, firstentry.value, " invalid" , ticketid, type, nonce = nonce)
282
+ storeFailedCheckin(firstentry.key, firstentry.value, " invalid" , ticketid, type, nonce = nonce, eventsAndCheckinLists = eventsAndCheckinLists.entries )
282
283
return TicketCheckProvider .CheckResult (TicketCheckProvider .CheckResult .Type .INVALID , offline = true )
283
284
}
284
285
val listId = eventsAndCheckinLists[event.slug] ? : return TicketCheckProvider .CheckResult (TicketCheckProvider .CheckResult .Type .ERROR , " Check-in list not set for event" , offline = true )
0 commit comments