Add method to create payment request and some bug fixes