Class WebhookEvent
Class WebhookEvent
A webhook event notification.
- PayPal\Common\PayPalModel
- PayPal\Common\PayPalResourceModel implements PayPal\Rest\IResource
- PayPal\Api\WebhookEvent
Methods summary
public
|
|
public
string
|
|
public
|
#
setCreateTime( string $create_time )
The date and time when the webhook event notification was created. |
public
string
|
|
public
|
#
setResourceType( string $resource_type )
The name of the resource related to the webhook notification event. |
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
#
setSummary( string $summary )
A summary description for the event notification. For example, |
public
string
|
#
getSummary( )
A summary description for the event notification. For example, |
public
|
#
setResource(
The resource that triggered the webhook event notification. |
public
|
|
public static
|
#
validateAndGetReceivedEvent( string $body,
Validates Received Event from Webhook, and returns the webhook event object. Because security verifications by verifying certificate chain is not enabled in PHP yet, we need to fallback to default behavior of retrieving the ID attribute of the data, and make a separate GET call to PayPal APIs, to retrieve the data. This is important to do again, as hacker could have faked the data, and the retrieved data cannot be trusted without either doing client side security validation, or making a separate call to PayPal APIs to retrieve the actual data. This limits the hacker to mimick a fake data, as hacker wont be able to predict the Id correctly. |
public static
|
#
get( string $eventId,
Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event. |
public
|
#
resend(
Resends a webhook event notification, by ID. Any pending notifications are not resent. |
public static
|
#
all( array $params,
Lists webhook event notifications. Use query parameters to filter the response. |
Methods inherited from PayPal\Common\PayPalResourceModel
addLink()
,
executeCall()
,
getLink()
,
getLinks()
,
removeLink()
,
setLinks()
,
updateAccessToken()
Methods inherited from PayPal\Common\PayPalModel
__construct()
,
__get()
,
__isset()
,
__set()
,
__toString()
,
__unset()
,
fromArray()
,
fromJson()
,
getList()
,
setCredential()
,
toArray()
,
toJSON()