/home/techb158/ileadtechnology.com/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api
NameSizeModeActions
Address.php10850644editdlrm
Agreement.php205130644editdlrm
AgreementDetails.php47870644editdlrm
AgreementStateDescriptor.php11490644editdlrm
AgreementTransaction.php48930644editdlrm
AgreementTransactions.php19350644editdlrm
AlternatePayment.php22300644editdlrm
Amount.php22980644editdlrm
Authorization.php158010644editdlrm
BankAccount.php143480644editdlrm
BankAccountsList.php26320644editdlrm
BankToken.php20360644editdlrm
BaseAddress.php42190644editdlrm
Billing.php7940644editdlrm
BillingAgreementToken.php3100644editdlrm
BillingInfo.php53760644editdlrm
CancelNotification.php36800644editdlrm
Capture.php90860644editdlrm
CarrierAccount.php30420644editdlrm
CarrierAccountToken.php14320644editdlrm
CartBase.php93800644editdlrm
ChargeModel.php15700644editdlrm
Cost.php14170644editdlrm
CountryCode.php9420644editdlrm
CreateProfileResponse.php6030644editdlrm
Credit.php10890644editdlrm
CreditCard.php154140644editdlrm
CreditCardHistory.php18490644editdlrm
CreditCardList.php26290644editdlrm
CreditCardToken.php40320644editdlrm
CreditFinancingOffered.php39890644editdlrm
Currency.php14750644editdlrm
CurrencyConversion.php55330644editdlrm
CustomAmount.php12510644editdlrm
DetailedRefund.php45500644editdlrm
Details.php58180644editdlrm
Error.php69850644editdlrm
ErrorDetails.php20920644editdlrm
ExtendedBankAccount.php9780644editdlrm
ExternalFunding.php33200644editdlrm
FileAttachment.php11380644editdlrm
FlowConfig.php31220644editdlrm
FmfDetails.php24050644editdlrm
FundingDetail.php23800644editdlrm
FundingInstrument.php77370644editdlrm
FundingOption.php49980644editdlrm
FundingSource.php63620644editdlrm
FuturePayment.php15600644editdlrm
HyperSchema.php33800644editdlrm
Image.php10110644editdlrm
Incentive.php44310644editdlrm
InputFields.php31040644editdlrm
InstallmentInfo.php31060644editdlrm
InstallmentOption.php21890644editdlrm
Invoice.php370400644editdlrm
InvoiceAddress.php6670644editdlrm
InvoiceItem.php51170644editdlrm
InvoiceNumber.php5850644editdlrm
InvoiceSearchResponse.php18210644editdlrm
Item.php98450644editdlrm
ItemList.php35020644editdlrm
Links.php25170644editdlrm
Measurement.php10760644editdlrm
MerchantInfo.php56380644editdlrm
MerchantPreferences.php60750644editdlrm
Metadata.php54500644editdlrm
NameValuePair.php11850644editdlrm
Notification.php31250644editdlrm
OpenIdAddress.php24510644editdlrm
OpenIdError.php18520644editdlrm
OpenIdSession.php37830644editdlrm
OpenIdTokeninfo.php82680644editdlrm
OpenIdUserinfo.php111610644editdlrm
Order.php135740644editdlrm
OverrideChargeModel.php11920644editdlrm
Participant.php41530644editdlrm
Patch.php22330644editdlrm
PatchRequest.php18470644editdlrm
Payee.php35310644editdlrm
Payer.php78300644editdlrm
PayerInfo.php92310644editdlrm
Payment.php197380644editdlrm
PaymentCard.php100530644editdlrm
PaymentCardToken.php33940644editdlrm
PaymentDefinition.php50220644editdlrm
PaymentDetail.php45570644editdlrm
PaymentExecution.php28170644editdlrm
PaymentHistory.php25260644editdlrm
PaymentInstruction.php46620644editdlrm
PaymentOptions.php22590644editdlrm
PaymentSummary.php11420644editdlrm
PaymentTerm.php16490644editdlrm
Payout.php49770644editdlrm
PayoutBatch.php24330644editdlrm
PayoutBatchHeader.php54640644editdlrm
PayoutItem.php64530644editdlrm
PayoutItemDetails.php59460644editdlrm
PayoutSenderBatchHeader.php52510644editdlrm
Phone.php15750644editdlrm
Plan.php120990644editdlrm
PlanList.php32490644editdlrm
PotentialPayerInfo.php24420644editdlrm
Presentation.php45820644editdlrm
PrivateLabelCard.php31180644editdlrm
ProcessorResponse.php37760644editdlrm
RecipientBankingInstruction.php32300644editdlrm
RedirectUrls.php16670644editdlrm
Refund.php71480644editdlrm
RefundDetail.php32450644editdlrm
RefundRequest.php37200644editdlrm
RelatedResources.php24670644editdlrm
Sale.php186400644editdlrm
Search.php125410644editdlrm
ShippingAddress.php22160644editdlrm
ShippingCost.php11790644editdlrm
ShippingInfo.php30080644editdlrm
Tax.php21740644editdlrm
Template.php78600644editdlrm
TemplateData.php151620644editdlrm
Templates.php69470644editdlrm
TemplateSettings.php14100644editdlrm
TemplateSettingsMetadata.php7050644editdlrm
Terms.php31380644editdlrm
Transaction.php14020644editdlrm
TransactionBase.php9430644editdlrm
Transactions.php6120644editdlrm
VerifyWebhookSignature.php73060644editdlrm
VerifyWebhookSignatureResponse.php8900644editdlrm
Webhook.php81820644editdlrm
WebhookEvent.php93050644editdlrm
WebhookEventList.php30530644editdlrm
WebhookEventType.php33500644editdlrm
WebhookEventTypeList.php15300644editdlrm
WebhookList.php13440644editdlrm
WebProfile.php86750644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEvent.php (9305B)
id = $id; return $this; } /** * The ID of the webhook event notification. * * @return string */ public function getId() { return $this->id; } /** * The date and time when the webhook event notification was created. * * @param string $create_time * * @return $this */ public function setCreateTime($create_time) { $this->create_time = $create_time; return $this; } /** * The date and time when the webhook event notification was created. * * @return string */ public function getCreateTime() { return $this->create_time; } /** * The name of the resource related to the webhook notification event. * * @param string $resource_type * * @return $this */ public function setResourceType($resource_type) { $this->resource_type = $resource_type; return $this; } /** * The name of the resource related to the webhook notification event. * * @return string */ public function getResourceType() { return $this->resource_type; } /** * The version of the event. * * @param string $event_version * * @return $this */ public function setEventVersion($event_version) { $this->event_version = $event_version; return $this; } /** * The version of the event. * * @return string */ public function getEventVersion() { return $this->event_version; } /** * The event that triggered the webhook event notification. * * @param string $event_type * * @return $this */ public function setEventType($event_type) { $this->event_type = $event_type; return $this; } /** * The event that triggered the webhook event notification. * * @return string */ public function getEventType() { return $this->event_type; } /** * A summary description for the event notification. For example, `A payment authorization was created.` * * @param string $summary * * @return $this */ public function setSummary($summary) { $this->summary = $summary; return $this; } /** * A summary description for the event notification. For example, `A payment authorization was created.` * * @return string */ public function getSummary() { return $this->summary; } /** * The resource that triggered the webhook event notification. * * @param \PayPal\Common\PayPalModel $resource * * @return $this */ public function setResource($resource) { $this->resource = $resource; return $this; } /** * The resource that triggered the webhook event notification. * * @return \PayPal\Common\PayPalModel */ public function getResource() { return $this->resource; } /** * 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. * * NOTE: PLEASE DO NOT USE THE DATA PROVIDED IN WEBHOOK DIRECTLY, AS HACKER COULD PASS IN FAKE DATA. IT IS VERY IMPORTANT THAT YOU RETRIEVE THE ID AND MAKE A SEPARATE CALL TO PAYPAL API. * * @deprecated Please use `VerifyWebhookSignature->post()` instead. * * @param string $body * @param ApiContext $apiContext * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return WebhookEvent * @throws \InvalidArgumentException if input arguments are incorrect, or Id is not found. * @throws PayPalConnectionException if any exception from PayPal APIs other than not found is sent. */ public static function validateAndGetReceivedEvent($body, $apiContext = null, $restCall = null) { if ($body == null | empty($body)){ throw new \InvalidArgumentException("Body cannot be null or empty"); } if (!JsonValidator::validate($body, true)) { throw new \InvalidArgumentException("Request Body is not a valid JSON."); } $object = new WebhookEvent($body); if ($object->getId() == null) { throw new \InvalidArgumentException("Id attribute not found in JSON. Possible reason could be invalid JSON Object"); } try { return self::get($object->getId(), $apiContext, $restCall); } catch(PayPalConnectionException $ex) { if ($ex->getCode() == 404) { // It means that the given webhook event Id is not found for this merchant. throw new \InvalidArgumentException("Webhook Event Id provided in the data is incorrect. This could happen if anyone other than PayPal is faking the incoming webhook data."); } throw $ex; } } /** * Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event. * * @param string $eventId * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return WebhookEvent */ public static function get($eventId, $apiContext = null, $restCall = null) { ArgumentValidator::validate($eventId, 'eventId'); $payLoad = ""; $json = self::executeCall( "/v1/notifications/webhooks-events/$eventId", "GET", $payLoad, null, $apiContext, $restCall ); $ret = new WebhookEvent(); $ret->fromJson($json); return $ret; } /** * Resends a webhook event notification, by ID. Any pending notifications are not resent. * * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return WebhookEvent */ public function resend($apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); $payLoad = ""; $json = self::executeCall( "/v1/notifications/webhooks-events/{$this->getId()}/resend", "POST", $payLoad, null, $apiContext, $restCall ); $this->fromJson($json); return $this; } /** * Lists webhook event notifications. Use query parameters to filter the response. * * @param array $params * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return WebhookEventList */ public static function all($params, $apiContext = null, $restCall = null) { ArgumentValidator::validate($params, 'params'); $payLoad = ""; $allowedParams = array( 'page_size' => 1, 'start_time' => 1, 'end_time' => 1, 'transaction_id' => 1, 'event_type' => 1, ); $json = self::executeCall( "/v1/notifications/webhooks-events" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall ); $ret = new WebhookEventList(); $ret->fromJson($json); return $ret; } }