Adyen 和 .NET Standard ..Webhook

问题描述 投票:0回答:1

是否有适用于 Adyen 的 ASP.NET Standard 的示例。专门寻找 WebHook 部分。我不使用.Net Core,如果可能的话我想避免它。

我已经成功地让客户端基于此示例的 php 版本工作:https://github.com/Adyen/adyen-components-js-sample-code。 (我很高兴与任何感兴趣的人分享这一点。)

我现在需要的是一个具体的答案:webhook 可以与 ASP.NET .NET Standard 一起使用吗?

.Net Core 就这么简单:

// Return a 202 status with an empty response body
return Accepted();

如何在 .Net Standard 中执行相同操作?

我已经尝试过这个:

protected void Page_Load(object sender, EventArgs e)
{
   Response.ContentType = ""; // not sure what = its not json
   Response.Write ( HttpStatusCode.Accepted);
   // this doesnt work because I want to return the code not write it as body.. not sure how to do this. 
}

邮递员的上述结果是这样说的:

我真正想要的是.Net Core 如何做到这一点:

webhooks adyen
1个回答
0
投票

您可以将正文留空并使用以下行:

Response.StatusCode = 202;

让我知道这是否有帮助

© www.soinside.com 2019 - 2024. All rights reserved.