I have created an Ionic/angular mobile app with Firebase as the backend. When a user wants to make an order, they can pay with their card.
The order can only be created once the payment has been paid. I have used a third parter payment processor called Peach Payments.
What I was doing before was after the payment was made (the user didn't have to leave the app to make the payment) the user would be redirected to a page that would make a request to a cloud function, that would then contact the payment processor, ensure the payment was successful then proceed to create the order if it is.
This approach was problematic because I later wanted to accept instant EFT's as a payment option and this required a browser to be accessed. The payment processor would then redirect the user back to the page that would make the request to the payment professor's server. However, the biggest issue I had was getting back to the app from the payment processor. It would work on some devices but not on others.
It then occurred to me that the peach payments has a web hooks fetaure that can post data to my server. I then used this to create the order instead of requiring the user to be on a specific page in the app.
This way the order gets created whether they are naviagted back to the app or not.
My question is, how are payments normally processed when am order needs to be created after it's success?
submitted by /u/ShanahJr
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/cIla0V9