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
Afficher le fichier Open project: aspnet/WebHooks

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

GetEventDataAsync() protected méthode

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
Résultat Task

ReceiveAsync() public méthode

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
Résultat Task

StripeWebHookReceiver() public méthode

Initializes a new instance of the StripeWebHookReceiver class.
public StripeWebHookReceiver ( ) : System
Résultat System