session_credit

Description

Stores temporal credit card information while a customer is making a order. When order is made, it is moved to credit_card.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID (shop.username).
session TEXT Login session ID (session.login_session).
company TEXT NOT NULL Credit card company.
number TEXT NOT NULL Credit card number.
nominee TEXT NOT NULL Credit card nominee. (Ascii roman character)
expiry_month INTEGER NOT NULL Expiry date (month)
expiry_year INTEGER NOT NULL Expiry date (year)
pin TEXT NOT NULL Credit card pin number.
ip TEXT NOT NULL

IP address of ordered user.

FIXME: This field must be moved to order.

billing_address_index INTEGER

This field may use to certify whether the billing address is same as credit card owner's address. (destination.index)

FIXME: Because of destination's content can be changed, it requires another table to just store the stable billing address.

FIXME?: Another table to hold just a billing address may be needed.

Related tables

Query

CREATE TABLE session_credit(
shop                   TEXT,
session                TEXT,
company                TEXT      NOT NULL,
number                 TEXT      NOT NULL,
nominee                TEXT      NOT NULL,
expiry_month           INTEGER   NOT NULL,
expiry_year            INTEGER   NOT NULL,
pin                    TEXT      NOT NULL,
ip                     TEXT      NOT NULL,
billing_address_index  INTEGER,
PRIMARY KEY(shop, session)
);