Hi All,
Looking for ideas here.
Our web app allows ordering of a voucher. To allow for easy square integration, I used the POS api/ POS app on the mobile device.
here is the step by step flow:
-
Our mobile web app takes a user to a form they fill out.
-
Once the form is filled, they tap a button that takes them to the pos app on their mobile device and passes all relevant data.
-
The square transaction runs, is successful, and saves to the list of square transactions
-
The POS app sends the callback url, which redirects the user back to our mobile web app and includes all the params related to the transaction.
-
The web app parses this data and makes some api calls to aws to upload certain data to our dynamodb and send automated emails. When I get success responses from aws, I redirect the user back home in the mobile web app.
95% of the time, it works as I just described above.
First question- is this the correct way to be handling this scenario?
Second question and the problem:
In about 5% of cases, the square transaction is successful but the aws transactions never run. I’m not sure what is happening on the user side as I nor any of the testers have been able to reproduce this issue.
I am thinking one of the following:
- User is somehow interrupting the redirect back to the web app
- Since the callback opens in a new tab almost every time, there might be an issue with how devices handle tabs and tab management.
- Something else is happening to cause the square transaction to be logged as a success and the card to be charged, but the redirect to the app to fail.
Would appreciate any ideas
Thank you in advance