Implement payment system on client and server side