Back to problems

Transaction Authorizer / Fraud Checks

Object-Oriented Programming · Goldman Sachs · Medium

Requirements For every purchase attempt, a card network invokes the service. A transaction includes fields such as: Create an in-memory TransactionAuthorizer that exposes an approve(transaction) method. Rule 1: decline any transaction whose Merchant Category Code is 9999. Rule 2: handle both a collection of MCCs banned for everyone and MCCs banned only for particular users. The globally blocked MCCs are 9999 and 0000. For user 1234, block 1111 and 2222. For user 5678, block…

Checking your access…