Edge computing for loyalty programs