Integrating Payu paypent gateway

I am trying to make a button that will make a payu transaction request. For this, I made a web page, and in the html builder, I wrote the code to make the payment request.
However, I don’t know how to import fields from doctypes/forms so I can pass variables like the amount of money to be transferred, email, phone, … into the html code. The www folder is empty, I tried making the files manually there but it didn’t work.

Is there a better way to do this?

Or can someone please guide me on how to build this webpage with python script on the server side?