Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

payment - How to generate payu UPI intent loader

I am looking for a solution using PayU to collect payments via GPay intent flow on a mobile web page.

One of the solutions is to open a payu page via a form as displayed on their demo page here: https://www.payubiz.in/upi

However, their page after opening the form, automatically redirects to a url of the form: https://api.payu.in/public/#/77748b2d3e286bf7d82862ab0d0aca19/upi .

This redirection is unclear to me. How is this URL generated? Can I make an api call to PayU to simply generate this URL?

Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like I found one solution.

We need to invoke payu APIs for UPI payments with following parameters alongwith others:

{
    bankcode: TEZ,
    pg: UPI,
    txn_s2s_flow: 4
}

This request returns a response where one of the fields is acsTemplate which is just an html form encoded in base64. We can open that form directly or extract the value of action attribute and open the payu payment page directly that way.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...