PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 All 211 releases
charitable / vendor / stripe / stripe-php / lib / Exception / SignatureVerificationException.php

SignatureVerificationException.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, 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