是否有适用于 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 如何做到这一点:
您可以将正文留空并使用以下行:
Response.StatusCode = 202;
让我知道这是否有帮助