Validating QR-code Tickets [MyTicket Scanner Application]

The MyTicket Software comes with a free Android application available on the Play Store. It allows you to validate tickets using the printed QR code. Tickets are provided as PDF printouts and can be customized to suit your needs.

You can download it here.

Private, Secure Ticket Validation

When the application scans a QR code generated by the MyTicket Events plugin, it retrieves a set of parameters that includes the order ID and a link to your server’s API. The app does not rely on any third-party backend to validate or transmit data, even though it serves multiple website owners around the world.

All communication occurs exclusively between the app and your website's backend. It's important to note that the app supports both HTTP and HTTPS protocols for data exchange. However, you should ensure your website uses an encrypted connection to protect the data.

Access Restriction

While the application is hosted globally, you can easily restrict access and allow only specific devices to view and validate ticket data hosted on your website. Each application instance has its own unique ID string, which can be copied from the app’s main settings screen (see image below).

This ID must be pasted into the Appearance > Customizer > MyTicket > Mobile App > Allowed App IDs section of your WordPress admin panel. Make sure to check the Private access checkbox. Enter each ID on a new line, ensuring there are no dots or whitespace characters.

Ticket Validation

Once the MyTicket plugin is installed, the first PDF ticket is set up, and the MyTicket Scanner app is installed, simply scan the QR code by pointing your phone’s camera at the code while the app is open. Once scanned, a popup window will appear with ticket details, including the order ID number, attendee's name, event title, and other useful information.

Note that you can check the status of your order in the Orders section of your WordPress admin immediately after the app validates or unvalidates the ticket. The app does not store this information internally, which eliminates the risk of conflicts when multiple applications are used simultaneously.

Here’s a refined version with improved grammar and style:

Common Issues

App Does Not Scan Tickets; Nothing Happens

This issue is likely server-side. When the application tries to retrieve ticket data, it cannot connect to your server. Ensure that your server is publicly accessible from the internet.

For example, below is the link where queries are sent. Replace myticket.kenzap.cloud with your website URL. Make sure to use the correct http or https protocol and paste the URL into your browser. The response should be "0," which indicates everything is working properly.

https://myticket.kenzap.cloud/wp-admin/admin-ajax.php

Error 500 or Blank Page

If you see a blank page, it indicates that your server has encountered an internal issue when processing the request. This is usually indicated by an error 500 or 501 code. To determine the exact cause, enable WordPress debug logging.

Error 404

The app may respond with an error 404 code, which means the server is rejecting the response. This could be due to one of the following reasons:

Debugging Data

The next step is to send ticket data to your server. While the URL might work correctly, some methods for processing ticket data may fail when specific parameters are sent. To troubleshoot, create an HTTP POST request and send additional data to your server.

There are various applications that can help with this. The screenshot below shows an example using the Postman application.

When this request is sent, the proper response should include a complex order structure stored in JSON format.

How to Improve Scanning Speed of the Application?

A common misconception is that scanning speed depends on the QR code decoding algorithm. In fact, the scanning process is very fast, taking no more than 100ms, even on slower Android devices. The main bottleneck is the quality of your network connection and latency.

Each time a QR code ticket is scanned, the app makes a new query to your website's database to retrieve the latest information about the ticket and its status. This step is crucial because it ensures that no conflicts arise when multiple app instances are used, and that the data stays synchronized with your website's server in real time.

First, verify that your internet connection is fast and stable. Note that internet speed does not necessarily correlate with latency. Next, ensure that latency is minimized. Latency refers to the delay required for the request to travel from your device to the server and back with the data.

For example, if your server is hosted in the Netherlands, but your app scans tickets in Johannesburg, there will be an additional network delay of about 250 milliseconds, or a quarter of a second.

Additionally, your server may be slow in processing the query. Ensure that there are no delays on the server side as well. Shared hosting with limited resources tends to perform slower.

This version should be clearer and more professional while maintaining the necessary technical detail.