Tutorial 6: Computer Applications for E-Commerce

COMP200 · Unit 4 · Section 6

Objectives

E-commerce combines catalogs, search, carts, identity, payment, inventory, fulfillment, support, and analytics. A checkout is a distributed workflow: it needs idempotency, authorization, transaction boundaries, clear status, privacy, and recovery when a provider fails.

browse -> cart -> authenticate -> authorize payment -> reserve -> fulfill

Exercises

  1. Draw an e-commerce data flow.
  2. Identify payment and privacy risks.
  3. Design recovery for a payment timeout.

Self-check

  1. What is idempotency?
  2. Why separate payment from inventory?
  3. What makes checkout trustworthy?

Self-Check Quiz

1. Why use idempotency in checkout?

AnswerTo prevent retries from creating duplicate orders or charges.

2. What should the system do on uncertain payment status?

AnswerUse a reconciliable pending state rather than blindly retrying or reporting a false success.

Homework

  1. Design an online bookstore workflow.
  2. Specify data, security, errors, and audit.
  3. Explain a provider outage response.
Sample answerUse authenticated sessions, server-side price and inventory checks, tokenized payment, idempotency keys, transactional order state, minimal personal data, and reconciliation. A provider timeout creates pending status and avoids duplicate charging until confirmed.