Hey guys,
I am developing a simple QR-code validation feature on my app and would like to ask for help.
There are two sides: Store and Customer. The QR Code validation is used to add points to a loyalty program.
1 - The Store employee inputs a number of points and generates a QR Code (using the app on his phone).
2 - The Customer then scans this QR Code with his phone (using the app) and automatically gets the corresponding number of points added to his account.
For this to work, I would like to be able to generate a custom URL based on the number of points and set this as the URL of the generated QR Code. Then, when the customer scans it, it will open the URL and automatically call the addPoints method.
I thought of something like: www.myapp.com/qr-generate?points=110
So that then all I need is to extract the “points=110” part - but no idea how to generate this URL dynamically (according to the number of points).
Do you know how I could achieve this? (or have any other suggestion about this feature)
Thanks!