Welcome Guest, Not a member yet? Register   Sign In
How to continue a Code Igniter function after rendering a view
#1

I am building a system (in code igniter 3) in which the user has to make a payment before they can register. I plan on implementing this by having the user fill in a form, when they submit the form they are redirected to a payment page (on a different website), after a given time the system will make a new call to the payment system the check whether the specific order was successfully paid, if so then the system adds the new user info to the database. The code would look a bit like:

    public function process_form(){
      *get form data
      *redirect user to payment page
      *wait for 5 minutes
      *make a request to payment system to check if given order was successfully paid
      if(paid)
        add new user to database
    }

I tried to implement the following code by using php sleep function but that waits before executing any code in the function. How can I go about implementing this?
Reply


Messages In This Thread
How to continue a Code Igniter function after rendering a view - by Lazarus-CG - 07-07-2020, 01:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB