Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...