Skip to content

sapphire-bt/mcdonalds-uk-survey-codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

McDonald's receipt code analysis (unofficial)

An attempt to reverse engineer the 12 digit codes found on McDonald's receipts used for the Food for Thoughts survey.

Important

Disclaimer

This project is an independent, educational analysis of McDonald's UK receipts.

It is not affiliated with, endorsed by, or connected to McDonald's International Property Company, Ltd.

The contents of this repository represent speculative research based on publicly available information, and are provided here for research and educational purposes only.

No part of this project is intended to enable or encourage misuse, fraud, or unauthorised access to McDonald's systems.

Polite notice to McLawyers: the french fries emoji, 🍟, is not McDonald's intellectual property; it's a Unicode character.

How to use

Call the script with the following arguments:

python get_code.py --store-id 1553 --order-id 1743 --purchased "2023-03-14 16:48"

The above will reproduce a known historical code, 7ZWW-NGH3-ZFWJ, as shown in the following receipt:

Receipt showing code 7ZWW-NGH3-ZFWJ

Note the receipt contains REG 20 - this is the default value used in the script, but not all receipts have the same value.

Algorithm speculation

The survey code above appears to be broken down as follows:

Code Decimal Meaning
7ZW 1553 Store ID.
WNG 2043 Usually seems to be a combination of the "reg" number multiplied by 100 + the order ID's last two digits. In this case: (20 * 100) + 43.
H3ZFW 3,742,128 Date/time of purchase (represented as number of minutes since 2016-02-01 00:00).
J 23 Check digit (Luhn mod N algorithm; uses 25 as a base).

Values are encoded using the following base 25 system:

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Base 25 C M 7 W D 6 N 4 R H F 9 Z L 3 X K Q G V P B T J Y

References

About

McDonald's receipt code analysis (unofficial)

Resources

Stars

Watchers

Forks