Cybersource Interview Question

Code part: Easiest... (Not even algorithmic)