How to provide a proof-of-payment to an offline Lightning Network vending machine? I'm considering building a Lightning Network vending machine that is offline but has the capability to create LN invoices and verify payments.

As an example the scheme has:


One offline vending machine.
One online node to validate payments.
One user (online with a cellphone).


For that there must be:


A way for the vending machine to provide valid invoices that can be paid to the online node.
A way for the user to communicate a prof-of-payment to the vending machine. 


Is this currently viable? Is this something that can/should be standardized so every wallet can implement it?
Stepan Snigirev had basically provided an explanation how to do the tricky part described at https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002009.html

The idea is that the vending machine creates an invoice with a routing hint that goes through the online node and the online node can construct the preimage from the onion that will be send. 

Another way would be to have a deterministic way of preimage generation as explained in this video:  https://youtu.be/bihYeAeNi0g - which was already inspired by Stepan but is not as elegant as his solution. 

Regarding the proof of payment the phone would just display a qr code of the preimage which a vending machine could scan