I have a checkout page with integration to Checkout.js.
I have set everything up so the user fills the form with informations such as credit card, name, email and this information is sent to checkout.js api.
After that the API responds with a payment_token and a redirect to a "/success" page. When this happens i want to set the order as complete.
What is the best way to do this in Drupal 7 so that I wont have any security problems with it?