added payment server logic