PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / stripe / stripe-php / lib / Exception / CardException.php
ameliabooking / vendor / stripe / stripe-php / lib / Exception Last commit date
OAuth 6 months ago ApiConnectionException.php 6 months ago ApiErrorException.php 6 months ago AuthenticationException.php 6 months ago BadMethodCallException.php 6 months ago CardException.php 6 months ago ExceptionInterface.php 6 months ago IdempotencyException.php 6 months ago InvalidArgumentException.php 6 months ago InvalidRequestException.php 6 months ago PermissionException.php 6 months ago RateLimitException.php 6 months ago SignatureVerificationException.php 6 months ago TemporarySessionExpiredException.php 6 months ago UnexpectedValueException.php 6 months ago UnknownApiErrorException.php 6 months ago
CardException.php
85 lines
1 <?php
2
3 namespace AmeliaVendor\Stripe\Exception;
4
5 /**
6 * CardException is thrown when a user enters a card that can't be charged for
7 * some reason.
8 */
9 class CardException extends ApiErrorException
10 {
11 protected $declineCode;
12 protected $stripeParam;
13
14 /**
15 * Creates a new CardException exception.
16 *
17 * @param string $message the exception message
18 * @param null|int $httpStatus the HTTP status code
19 * @param null|string $httpBody the HTTP body as a string
20 * @param null|array $jsonBody the JSON deserialized body
21 * @param null|array|\AmeliaVendor\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
22 * @param null|string $stripeCode the Stripe error code
23 * @param null|string $declineCode the decline code
24 * @param null|string $stripeParam the parameter related to the error
25 *
26 * @return CardException
27 */
28 public static function factory(
29 $message,
30 $httpStatus = null,
31 $httpBody = null,
32 $jsonBody = null,
33 $httpHeaders = null,
34 $stripeCode = null,
35 $declineCode = null,
36 $stripeParam = null
37 ) {
38 $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode);
39 $instance->setDeclineCode($declineCode);
40 $instance->setStripeParam($stripeParam);
41
42 return $instance;
43 }
44
45 /**
46 * Gets the decline code.
47 *
48 * @return null|string
49 */
50 public function getDeclineCode()
51 {
52 return $this->declineCode;
53 }
54
55 /**
56 * Sets the decline code.
57 *
58 * @param null|string $declineCode
59 */
60 public function setDeclineCode($declineCode)
61 {
62 $this->declineCode = $declineCode;
63 }
64
65 /**
66 * Gets the parameter related to the error.
67 *
68 * @return null|string
69 */
70 public function getStripeParam()
71 {
72 return $this->stripeParam;
73 }
74
75 /**
76 * Sets the parameter related to the error.
77 *
78 * @param null|string $stripeParam
79 */
80 public function setStripeParam($stripeParam)
81 {
82 $this->stripeParam = $stripeParam;
83 }
84 }
85