【发布时间】:2016-04-06 22:29:52
【问题描述】:
我正在尝试从 Stripe on Grails(2.5.1) 捕获测试网络挂钩。我在我的 URLmappings 中设置了一行,当我在运行 ngrok 的本地计算机上的浏览器上直接访问 URL 时,将执行控制器方法 ok。但是,我似乎无法将 Stripe 有效负载发送到控制器?谢谢!
//UrlMappings.groovy
class UrlMappings {
static mappings = {
"/stripe-demo" (controller: 'charge', action: 'respond')
"/$controller/$action?/$id?(.$format)?"{
constraints {
// apply constraints here
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
//Controller
package stripe.demo
class ChargeController {
def respond(String payload){
//capture the payload sent by Stripe and do something, also respond with 200.
}
}
【问题讨论】:
标签: grails stripe-payments webhooks ngrok