1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Solution for collecting payments from Ionic Mobile app

Discussion in 'JavaScript' started by vinod_3466, Apr 6, 2017.

  1. #1
    I have developed a website which can accept online payment through PayTm (A payment gateway in India). I post the cust_id and amount to a file in my server (say redirect.php) which in turn generates other required parameters including checksumhash and redirect the user to payment gateway to complete the payment. This works fine

    Now, I have a hybrid mobile app using ionic framework and it collects payment using the same above method. I tried finding a plugin but couldn't.
    SEMrush
    So here is the solution i have implemented, so far it works fine and i have very few app users as of now. Please let me know if it is a good idea or do you have any better one.
    1. create a form in mobile app and generate a random order_id
    2. Accept the amount from the user in the form and submit
    3. Using form post method, post the data to redirect.php and redirect the user to redirect.php (The file stored in my server). This will open in a new browser window.
    4. The app keeps querying the db for the status of the order_id
    5. meanwhile, user completes the transaction in the gateway and the window is closed.
    6. User returns back to app and the app displays the status of the transaction.
    I asked the same question elsewhere but no proper solution
     
    vinod_3466, Apr 6, 2017 IP
    SEMrush