how to redirect to an external URL using POST in grails

后端 未结 2 2041
無奈伤痛
無奈伤痛 2021-01-22 02:45

I am integrating my website with payment gateway...I want to take some parameters from the user and add some parameters from my side , and then send data to the payment gateway.

2条回答
  •  梦谈多话
    2021-01-22 03:20

    The two steps you need are: First while making ajax call add parameters from user in client side. Second add your required parameters on server-side. After that you can forward the details to your gateway.

    def addYourParameters()
    {
    // did required operation here
    forward controller:'gateway', action:'yourAction', params: [required Map]
    }
    

提交回复
热议问题