Pass spec tests.
Create purchase_record and settle unit tests.