Sending carts and displaying the game

Steps and examples of how to use the chosen integration technology or language to send shopping carts and display the game.

Buying process and implementation

Standard online buying process

The diagram below shows the lines of communication established between the customer’s browser, the e-commerce site and the Lucky Cart servers. It is applied in the event of a simple game provided directly on an e-commerce site order confirmation page.

  1. The customer confirms payment of his order. When the order confirmation page is generated, the e-commerce site sends an authenticated request to the Lucky Cart servers to request the Lucky Cart scripts. This request sends transactional data settings (customer identifier, transaction identifier, cart total, etc.) and data identifiers (API key and API secret).
  2. - Verification of authentication information in order to validate that the request is from a known Lucky Cart e-commerce site.
    - Analysis and filtering of data settings in order to localise the active campaign specific to the transaction, and creation of a game and a unique identifier.
    - Construction and sending of Lucky Cart’s game loading bootstraps (JavaScript code, data).
  3. The browser executes the inserted bootstraps, consisting only of calls to the Lucky Cart servers.
  4. The Lucky Cart servers resend the corresponding necessary static libraries for the interpretation of the game’s data and its display on the page.

Implementation

Whichever module is chosen by the e-commerce site, its functioning remains largely the same:

  1. Installation and inclusion of the library relating to the specific technology.
  2. Initialisation of the library with the necessary identification data (key/secret) given for the specified environment.
  3. Building and sending the transaction data using the plugin method.
  4. Insertion on the order confirmation page (or any other page where the game is supposed to be displayed) of the loading and displaying elements of the game sent back by the API.