Beacon with server connectivity

I am developing cross platform app for receiving from beacons when mobile device comes within its range. After that I want to push data from my app either back to beacon or send some custom data packet to a local server and finally call a web service from there for storing the data.

Due to overcoming offline limitation from mobile app I don’t want my app to send the data when received packet from beacon rather to a local server to do it which will always be available online. Kindly suggest something in this regard.