How does the implementation should work?

How does the implementation should work?

  1. When the customer confirms the purchase on your website, the service must be consumed to perform the createRequest with the explained parameters.
  2. If the request is successful, it returns the URL to which the client should be redirected to perform payment. Otherwise it returns the reason for the rejection of the transaction.
  3. Redirect the browser to the URL returned on success.
  4. Once the transaction returns (returns to the URL specified in the createRequest consumption), you should ask about the status of the transaction by consuming the getRequestInformation.
  5. Depending on the response of the service, the transaction may be approved, rejected or pending further processing.
  6. Inform the user the status of the transaction.
  7. If the transaction is pending, or if the customer abandon the website and was not returned, you must have a cron job that ask for the status of the pending transactions. You must consume the service only after the expiration date that you send in the original request.