Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • Address
  • Agreement
  • AgreementDetails
  • AgreementStateDescriptor
  • AgreementTransaction
  • AgreementTransactions
  • AlternatePayment
  • Amount
  • Authorization
  • BankAccount
  • BankAccountsList
  • BankToken
  • BaseAddress
  • Billing
  • BillingAgreementToken
  • BillingInfo
  • CancelNotification
  • Capture
  • CarrierAccount
  • CarrierAccountToken
  • CartBase
  • ChargeModel
  • Cost
  • CountryCode
  • CreateProfileResponse
  • Credit
  • CreditCard
  • CreditCardHistory
  • CreditCardList
  • CreditCardToken
  • CreditFinancingOffered
  • Currency
  • CurrencyConversion
  • CustomAmount
  • DetailedRefund
  • Details
  • Error
  • ErrorDetails
  • ExtendedBankAccount
  • ExternalFunding
  • FileAttachment
  • FlowConfig
  • FmfDetails
  • FundingDetail
  • FundingInstrument
  • FundingOption
  • FundingSource
  • FuturePayment
  • HyperSchema
  • Image
  • Incentive
  • InputFields
  • InstallmentInfo
  • InstallmentOption
  • Invoice
  • InvoiceAddress
  • InvoiceItem
  • InvoiceNumber
  • InvoiceSearchResponse
  • Item
  • ItemList
  • Links
  • Measurement
  • MerchantInfo
  • MerchantPreferences
  • Metadata
  • NameValuePair
  • Notification
  • OpenIdAddress
  • OpenIdError
  • OpenIdSession
  • OpenIdTokeninfo
  • OpenIdUserinfo
  • Order
  • OverrideChargeModel
  • Participant
  • Patch
  • PatchRequest
  • Payee
  • Payer
  • PayerInfo
  • Payment
  • PaymentCard
  • PaymentCardToken
  • PaymentDefinition
  • PaymentDetail
  • PaymentExecution
  • PaymentHistory
  • PaymentInstruction
  • PaymentOptions
  • PaymentSummary
  • PaymentTerm
  • Payout
  • PayoutBatch
  • PayoutBatchHeader
  • PayoutItem
  • PayoutItemDetails
  • PayoutSenderBatchHeader
  • Phone
  • Plan
  • PlanList
  • PotentialPayerInfo
  • Presentation
  • PrivateLabelCard
  • ProcessorResponse
  • RecipientBankingInstruction
  • RedirectUrls
  • Refund
  • RefundDetail
  • RefundRequest
  • RelatedResources
  • Sale
  • Search
  • ShippingAddress
  • ShippingCost
  • ShippingInfo
  • Tax
  • Template
  • TemplateData
  • Templates
  • TemplateSettings
  • TemplateSettingsMetadata
  • Terms
  • Transaction
  • TransactionBase
  • Transactions
  • VerifyWebhookSignature
  • VerifyWebhookSignatureResponse
  • Webhook
  • WebhookEvent
  • WebhookEventList
  • WebhookEventType
  • WebhookEventTypeList
  • WebhookList
  • WebProfile

Class Webhook

Class Webhook

One or more webhook objects.

PayPal\Common\PayPalModel
Extended by PayPal\Common\PayPalResourceModel implements PayPal\Rest\IResource
Extended by PayPal\Api\Webhook
Namespace: PayPal\Api
Package: PayPal\Api
Located at PayPal/Api/Webhook.php

Methods summary

public
# setId( string $id )

The ID of the webhook.

The ID of the webhook.

Parameters

$id

Returns


$this
public string
# getId( )

The ID of the webhook.

The ID of the webhook.

Returns

string
public
# setUrl( string $url )

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.

Parameters

$url

Returns


$this

Throws

InvalidArgumentException
public string
# getUrl( )

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.

Returns

string
public
# setEventTypes( PayPal\Api\WebhookEventType[] $event_types )

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.

Parameters

$event_types

Returns


$this
public PayPal\Api\WebhookEventType[]
# getEventTypes( )

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.

Returns

PayPal\Api\WebhookEventType[]
public
# addEventType( PayPal\Api\WebhookEventType $webhookEventType )

Append EventTypes to the list.

Append EventTypes to the list.

Parameters

$webhookEventType

Returns


$this
public
# removeEventType( PayPal\Api\WebhookEventType $webhookEventType )

Remove EventTypes from the list.

Remove EventTypes from the list.

Parameters

$webhookEventType

Returns


$this
public PayPal\Api\Webhook
# create( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Subscribes your webhook listener to events. A successful call returns a webhook object, which includes the webhook ID for later use.

Subscribes your webhook listener to events. A successful call returns a webhook object, which includes the webhook ID for later use.

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Webhook
public static PayPal\Api\Webhook
# get( string $webhookId, PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Shows details for a webhook, by ID.

Shows details for a webhook, by ID.

Parameters

$webhookId
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Webhook
public static PayPal\Api\WebhookList
# getAll( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Retrieves all Webhooks for the application associated with access token.

Retrieves all Webhooks for the application associated with access token.

Deprecated

Please use Webhook#getAllWithParams instead.

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\WebhookList
public static PayPal\Api\WebhookList
# getAllWithParams( array $params = array(), PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Lists all webhooks for an app.

Lists all webhooks for an app.

Parameters

$params
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\WebhookList
public PayPal\Api\Webhook
# update( PayPal\Api\PatchRequest $patchRequest, PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Replaces webhook fields with new values. Pass a json_patch object with replace operation and path, which is /url for a URL or /event_types for events. The value is either the URL or a list of events.

Replaces webhook fields with new values. Pass a json_patch object with replace operation and path, which is /url for a URL or /event_types for events. The value is either the URL or a list of events.

Parameters

$patchRequest
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Webhook
public boolean
# delete( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Deletes a webhook, by ID.

Deletes a webhook, by ID.

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean

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()

Properties summary

Properties inherited from PayPal\Common\PayPalModel

$credential

API documentation generated by ApiGen