C# Class PayPal.Api.WebhookEvent

A webhook event notification.

See PayPal Developer documentation for more information.

Inheritance: PayPalRelationalObject
显示文件 Open project: paypal/PayPal-NET-SDK Class Usage Examples

Private Properties

Property Type Description
ConvertAuthAlgorithmHeaderToHashAlgorithmName string

Public Methods

Method Description
Get ( APIContext apiContext, string eventId ) : WebhookEvent

Shows details for a webhook event notification, by ID.

List ( APIContext apiContext, int pageSize = 10, string startTime = "", string endTime = "" ) : WebhookEventList

Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events.

Resend ( APIContext apiContext ) : WebhookEvent

Resends the Webhooks event resource identified by event_id.

Resend ( APIContext apiContext, string webhookEventId ) : WebhookEvent

Resends the Webhooks event resource identified by event_id.

ValidateReceivedEvent ( APIContext apiContext, NameValueCollection requestHeaders, string requestBody, string webhookId = "" ) : bool

Validates a received webhook event by checking the signature of the event and verifying the event originated from PayPal.

Private Methods

Method Description
ConvertAuthAlgorithmHeaderToHashAlgorithmName ( string authAlgorithmHeader ) : string

Converts the algorithm name specified by authAlgorithmHeader into a hash algorithm name recognized by System.Security.Cryptography.CryptoConfig.

Method Details

Get() public static method

Shows details for a webhook event notification, by ID.
public static Get ( APIContext apiContext, string eventId ) : WebhookEvent
apiContext APIContext APIContext used for the API call.
eventId string The ID of the webhook event notification for which to show details.
return WebhookEvent

List() public static method

Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events.
public static List ( APIContext apiContext, int pageSize = 10, string startTime = "", string endTime = "" ) : WebhookEventList
apiContext APIContext APIContext used for the API call.
pageSize int Number of items to be returned by a GET operation
startTime string Resource creation time that indicates the start of a range of results.
endTime string Resource creation time that indicates the end of a range of results.
return WebhookEventList

Resend() public method

Resends the Webhooks event resource identified by event_id.
public Resend ( APIContext apiContext ) : WebhookEvent
apiContext APIContext APIContext used for the API call.
return WebhookEvent

Resend() public static method

Resends the Webhooks event resource identified by event_id.
public static Resend ( APIContext apiContext, string webhookEventId ) : WebhookEvent
apiContext APIContext APIContext used for the API call.
webhookEventId string ID of the webhook event to resend.
return WebhookEvent

ValidateReceivedEvent() public static method

Validates a received webhook event by checking the signature of the event and verifying the event originated from PayPal.
public static ValidateReceivedEvent ( APIContext apiContext, NameValueCollection requestHeaders, string requestBody, string webhookId = "" ) : bool
apiContext APIContext APIContext containing any configuration settings to be used when validating the event.
requestHeaders System.Collections.Specialized.NameValueCollection A collection of HTTP request headers included with the received webhook event.
requestBody string The body of the received HTTP request.
webhookId string ID of the webhook resource associated with this webhook event. If not specified, it is assumed the ID is provided via the Config property of the parameter.
return bool