Update payment module and fix bugs