PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.29
Booktics – Appointment Booking Calendar for Service Businesses v1.0.29
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
booktics / vendor / stripe / stripe-php / lib / Exception / SignatureVerificationException.php

SignatureVerificationException.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.29, at vendor/stripe/stripe-php/lib/Exception/SignatureVerificationException.php

75 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Stripe\Exception;
4
5 /**
6 * SignatureVerificationException is thrown when the signature verification for
7 * a webhook fails.
8 */
9 class SignatureVerificationException extends \Exception implements ExceptionInterface
10 {
11 protected $httpBody;
12 protected $sigHeader;
13
14 /**
15 * Creates a new SignatureVerificationException exception.
16 *
17 * @param string $message the exception message
18 * @param null|string $httpBody the HTTP body as a string
19 * @param null|string $sigHeader the `Stripe-Signature` HTTP header
20 *
21 * @return SignatureVerificationException
22 */
23 public static function factory(
24 $message,
25 $httpBody = null,
26 $sigHeader = null
27 ) {
28 $instance = new static($message);
29 $instance->setHttpBody($httpBody);
30 $instance->setSigHeader($sigHeader);
31
32 return $instance;
33 }
34
35 /**
36 * Gets the HTTP body as a string.
37 *
38 * @return null|string
39 */
40 public function getHttpBody()
41 {
42 return $this->httpBody;
43 }
44
45 /**
46 * Sets the HTTP body as a string.
47 *
48 * @param null|string $httpBody
49 */
50 public function setHttpBody($httpBody)
51 {
52 $this->httpBody = $httpBody;
53 }
54
55 /**
56 * Gets the `Stripe-Signature` HTTP header.
57 *
58 * @return null|string
59 */
60 public function getSigHeader()
61 {
62 return $this->sigHeader;
63 }
64
65 /**
66 * Sets the `Stripe-Signature` HTTP header.
67 *
68 * @param null|string $sigHeader
69 */
70 public function setSigHeader($sigHeader)
71 {
72 $this->sigHeader = $sigHeader;
73 }
74 }
75