C# Class Microsoft.AspNet.WebHooks.StripeWebHookReceiver

Provides an IWebHookReceiver implementation which supports WebHooks generated by Stripe. Set the 'MS_WebHookReceiverSecret_Stripe' application setting to the application key defined in Stripe. The corresponding WebHook URI is of the form 'https://<host>/api/webhooks/incoming/stripe/{id}'. For details about Stripe WebHooks, see https://stripe.com/docs/webhooks.
Inheritance: Microsoft.AspNet.WebHooks.WebHookReceiver, IDisposable
ファイルを表示 Open project: aspnet/WebHooks

Public Methods

Method Description
Dispose ( ) : void
ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task
StripeWebHookReceiver ( ) : System

Initializes a new instance of the StripeWebHookReceiver class.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources and optionally releases the managed resources.

GetEventDataAsync ( HttpRequestMessage request, string id, string notificationId ) : Task

Gets the event data for this ID from the authenticated source so that we know that it is valid.

Private Methods

Method Description
IsTestEvent ( string notificationId ) : bool
StripeWebHookReceiver ( HttpClient httpClient ) : System

Initializes a new instance of the StripeWebHookReceiver class with a given httpClient. This constructor is used for testing purposes.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetEventDataAsync() protected method

Gets the event data for this ID from the authenticated source so that we know that it is valid.
protected GetEventDataAsync ( HttpRequestMessage request, string id, string notificationId ) : Task
request System.Net.Http.HttpRequestMessage
id string
notificationId string
return Task

ReceiveAsync() public method

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
return Task

StripeWebHookReceiver() public method

Initializes a new instance of the StripeWebHookReceiver class.
public StripeWebHookReceiver ( ) : System
return System