1

我已经在 chargify 中配置了 webhook url。此网址用于 webapi。

所以我正在处理 webapi 中的所有事件。但我想知道我们如何从 chargify 中获取请求参数。如果有人有例子,请给我。

下面是来自 chargify webhook 的一个事件的请求

您可以通过以下链接获取事件的 webhook 发送请求。 https://docs.chargify.com/webhooks#signup-success-payload

请帮助我。

提前致谢。

4

1 回答 1

1

由于它作为表单参数提交到 webhook url,因此在 MVC 中,您的签名将类似于以下内容:

public ActionResult ReceiveWebhook(FormCollection webhookPayload, string signature_hmac_sha_256)

该参数signature_hmac_sha_256包含在查询字符串中,因此在此处传递。

然后,您可以使用以下命令运行不同的逻辑event

var eventName = webhookPayload["event"];
于 2015-12-14T14:40:59.963 回答