fix bugs: purchase exception handling with ajax