Fix app purchase and in-app pay (bug 1010533)