PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
dokan-pro
/
vendor
/
stripe
/
stripe-php
/
lib
<?php namespace Stripe; abstract class Webhook { const DEFAULT_TOLERANCE = 300; /** * Returns an Event instance using the provided JSON payload. Throws an * Exception\UnexpectedValueException if the payload is not valid JSON, and * an Exception\SignatureVerificationException if the signature * verification fails for any reason. * * @param string $payload the payload sent by Stripe. * @param string $sigHeader the contents of the signature header sent by * Stripe. * @param string $secret secret used to generate the signature. * @param int $tolerance maximum difference allowed between the header's * timestamp and the current time * @return Event the Event instance * @throws Exception\UnexpectedValueException if the payload is not valid JSON, * @throws Exception\SignatureVerificationException if the verification fails. */ public static function constructEvent($payload, $sigHeader, $secret, $tolerance = self::DEFAULT_TOLERANCE) { WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance); $data = json_decode($payload, true); $jsonError = json_last_error(); if ($data === null && $jsonError !== JSON_ERROR_NONE) { $msg = "Invalid payload: $payload " . "(json_last_error() was $jsonError)"; throw new Exception\UnexpectedValueException($msg); } $event = Event::constructFrom($data); return $event; } }
[+]
..
[-] UsageRecordSummary.php
[edit]
[-] Transfer.php
[edit]
[-] SubscriptionItem.php
[edit]
[-] SKU.php
[edit]
[-] ExchangeRate.php
[edit]
[-] LoginLink.php
[edit]
[-] ErrorObject.php
[edit]
[-] BitcoinReceiver.php
[edit]
[-] BitcoinTransaction.php
[edit]
[-] ApiRequestor.php
[edit]
[-] AccountLink.php
[edit]
[-] Stripe.php
[edit]
[-] Coupon.php
[edit]
[-] Topup.php
[edit]
[-] Dispute.php
[edit]
[-] Card.php
[edit]
[-] SubscriptionSchedule.php
[edit]
[-] Collection.php
[edit]
[-] ApplicationFeeRefund.php
[edit]
[-] BankAccount.php
[edit]
[-] SingletonApiResource.php
[edit]
[-] Customer.php
[edit]
[-] Plan.php
[edit]
[-] Account.php
[edit]
[+]
HttpClient
[-] WebhookSignature.php
[edit]
[-] PaymentMethod.php
[edit]
[-] Balance.php
[edit]
[+]
Checkout
[-] FileLink.php
[edit]
[+]
Exception
[-] Review.php
[edit]
[-] StripeObject.php
[edit]
[-] EphemeralKey.php
[edit]
[+]
ApiOperations
[-] OrderReturn.php
[edit]
[-] CreditNote.php
[edit]
[-] Webhook.php
[edit]
[-] Person.php
[edit]
[-] Refund.php
[edit]
[-] Capability.php
[edit]
[+]
Issuing
[-] RequestTelemetry.php
[edit]
[-] AlipayAccount.php
[edit]
[-] Payout.php
[edit]
[-] OAuth.php
[edit]
[-] OAuthErrorObject.php
[edit]
[-] TransferReversal.php
[edit]
[-] ApiResponse.php
[edit]
[-] Recipient.php
[edit]
[-] CustomerBalanceTransaction.php
[edit]
[-] InvoiceItem.php
[edit]
[-] Source.php
[edit]
[-] Event.php
[edit]
[-] Token.php
[edit]
[-] ApplicationFee.php
[edit]
[-] ThreeDSecure.php
[edit]
[-] Charge.php
[edit]
[-] ApplePayDomain.php
[edit]
[-] TaxId.php
[edit]
[+]
Radar
[-] Order.php
[edit]
[-] RecipientTransfer.php
[edit]
[-] SetupIntent.php
[edit]
[-] ApiResource.php
[edit]
[-] TaxRate.php
[edit]
[+]
Reporting
[+]
Terminal
[-] OrderItem.php
[edit]
[-] File.php
[edit]
[+]
Util
[-] Subscription.php
[edit]
[-] UsageRecord.php
[edit]
[+]
Sigma
[-] InvoiceLineItem.php
[edit]
[-] Discount.php
[edit]
[-] CountrySpec.php
[edit]
[-] SourceTransaction.php
[edit]
[-] Invoice.php
[edit]
[-] WebhookEndpoint.php
[edit]
[-] BalanceTransaction.php
[edit]
[-] PaymentIntent.php
[edit]
[-] Product.php
[edit]