Replace code in postback() with calls to Purchase::purchaseFoo()