Improve payment and purchase item models

Specify the table for STI models in a single place. Use a constant for the
completed state value.