Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
this.sentry = sentry
}

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?) {
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?, candidateCheckinLists: Collection<Long>? = null) {
/*
:<json boolean error_reason: One of ``canceled``, ``invalid``, ``unpaid``, ``product``, ``rules``, ``revoked``,
``incomplete``, ``already_redeemed``, ``blocked``, ``invalid_time``, or ``error``. Required.
Expand Down Expand Up @@ -71,6 +71,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
if (item != null && item > 0) jdoc.put("item", item)
if (variation != null && variation > 0) jdoc.put("variation", variation)
if (subevent != null && subevent > 0) jdoc.put("subevent", subevent)
if (candidateCheckinLists != null) jdoc.put("candidate_checkin_lists", candidateCheckinLists)

val qo = QueuedCall()
val api = PretixApi.fromConfig(config) // todo: uses wrong http client
Expand Down Expand Up @@ -278,7 +279,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val dataStore:
}
if (decoded == null || event == null) {
val firstentry = eventsAndCheckinLists.entries.first()
storeFailedCheckin(firstentry.key, firstentry.value, "invalid", ticketid, type, nonce = nonce)
storeFailedCheckin(firstentry.key, firstentry.value, "invalid", ticketid, type, nonce = nonce, candidateCheckinLists=eventsAndCheckinLists.values)
return TicketCheckProvider.CheckResult(TicketCheckProvider.CheckResult.Type.INVALID, offline = true)
}
val listId = eventsAndCheckinLists[event.slug] ?: return TicketCheckProvider.CheckResult(TicketCheckProvider.CheckResult.Type.ERROR, "Check-in list not set for event", offline = true)
Expand Down