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 / InvalidRequestException.php

InvalidRequestException.php in GiveWP – Donation Plugin and Fundraising Platform 4.15.4, at vendor/stripe/stripe-php/lib/Exception/InvalidRequestException.php

61 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 * InvalidRequestException is thrown when a request is initiated with invalid
7 * parameters.
8 */
9 class InvalidRequestException extends ApiErrorException
10 {
11 protected $stripeParam;
12
13 /**
14 * Creates a new InvalidRequestException exception.
15 *
16 * @param string $message the exception message
17 * @param null|int $httpStatus the HTTP status code
18 * @param null|string $httpBody the HTTP body as a string
19 * @param null|array $jsonBody the JSON deserialized body
20 * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
21 * @param null|string $stripeCode the Stripe error code
22 * @param null|string $stripeParam the parameter related to the error
23 *
24 * @return InvalidRequestException
25 */
26 public static function factory(
27 $message,
28 $httpStatus = null,
29 $httpBody = null,
30 $jsonBody = null,
31 $httpHeaders = null,
32 $stripeCode = null,
33 $stripeParam = null
34 ) {
35 $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode);
36 $instance->setStripeParam($stripeParam);
37
38 return $instance;
39 }
40
41 /**
42 * Gets the parameter related to the error.
43 *
44 * @return null|string
45 */
46 public function getStripeParam()
47 {
48 return $this->stripeParam;
49 }
50
51 /**
52 * Sets the parameter related to the error.
53 *
54 * @param null|string $stripeParam
55 */
56 public function setStripeParam($stripeParam)
57 {
58 $this->stripeParam = $stripeParam;
59 }
60 }
61