PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.4
GiveWP – Donation Plugin and Fundraising Platform v4.15.4
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / vendor / stripe / stripe-php / lib / Exception / SignatureVerificationException.php

SignatureVerificationException.php in GiveWP – Donation Plugin and Fundraising Platform 4.15.4, 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