C# Класс Microsoft.AspNet.WebHooks.PaypalWebHookReceiver

Provides an IWebHookReceiver implementation which supports WebHooks generated by Paypal using the Paypal .NET SDK, see https://www.nuget.org/packages/PayPal. Configure the Paypal WebHook settings using the web.config file as described in https://github.com/paypal/PayPal-NET-SDK/wiki/Webhook-Event-Validation. The corresponding WebHook URI is of the form 'https://<host>/api/webhooks/incoming/paypal'. For details about Paypal WebHooks, see https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-webhooks-overview/.
Наследование: Microsoft.AspNet.WebHooks.WebHookReceiver
Показать файл Открыть проект

Открытые методы

Метод Описание
PaypalWebHookReceiver ( ) : System

Initializes a new instance of the PaypalWebHookReceiver class.

ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task

Защищенные методы

Метод Описание
ValidateReceivedEvent ( System.Web.Http.Controllers.HttpRequestContext context, NameValueCollection headers, string body ) : bool

Validates the received WebHook.

Приватные методы

Метод Описание
GetRequestHeaders ( HttpRequestMessage request ) : NameValueCollection
PaypalWebHookReceiver ( bool initialize ) : System

Initializes a new instance of the PaypalWebHookReceiver class. This constructor is intended for testing purposes.

Описание методов

PaypalWebHookReceiver() публичный Метод

Initializes a new instance of the PaypalWebHookReceiver class.
public PaypalWebHookReceiver ( ) : System
Результат System

ReceiveAsync() публичный Метод

public ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task
id string
context System.Web.Http.Controllers.HttpRequestContext
request System.Net.Http.HttpRequestMessage
Результат Task

ValidateReceivedEvent() защищенный Метод

Validates the received WebHook.
protected ValidateReceivedEvent ( System.Web.Http.Controllers.HttpRequestContext context, NameValueCollection headers, string body ) : bool
context System.Web.Http.Controllers.HttpRequestContext The current .
headers System.Collections.Specialized.NameValueCollection The request headers for the current .
body string The request body for the current .
Результат bool