• QR Code Fare Media
    Aucune date d'échéance 0 Ouvert 0 Fermé

    Accept QR Code fare media.

    A user can purchase a one-time pass in the form of a QR code that is sent to their phone, either as an application, something they can log into a web site for or a PDF that they save locally.

    Once the QR code is presented to the PIU/DIU, a fare will be deducted as appropriate. The QR code pass is associated with some other credential (Magstripe for now) and so is not a fare media in and of itself, really, but a mapping to an underlying fare media.


    Implementation Notes

    • Create a server side database table that has a "sequence number" in addition to the QR code public/private string pair
    • Extend the server side billing daemon to now look for QR invalidation requests to update the QR string pair database table
    • Extend the server side buspass daemon to now look for QR queries (QRQUERY) with the same semantics as the pass queries
    • The DIUs will maintain a local database of QR string pairs, updating as necessary from polling the server side daemon and communicating back any usage from the key pairs
    • There should be a reference implementation in the admin web site that allows a QR code to be generated for some fare media (magstripe) that can be sent/downloaded/etc. as a PDF

    The beginnings of the DIU implementation can be found in the fareqr.c file. It's probably appropriate to put further database updates to the DIU local QR string pairs in passdb as well, though we should look into whether this overloads passdb too much.

    A new message type should be added to broadcast a QR invalidation, generated by passdb and received by billdb. billdb can put the QR invalidation message, which should just be a new message with the public string, into it's local billing log and send as it would with any other billing log entry. Legacy server side billing logs should just take it as an invalid message and updated billing log daemons can process as appropriate.