composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / Error / Card.php
blobf3ff343d899533ef3a02ddc5626d2a39f786f015
1 <?php
3 namespace Stripe\Error;
5 class Card extends Base
7 public function __construct(
8 $message,
9 $stripeParam,
10 $stripeCode,
11 $httpStatus,
12 $httpBody,
13 $jsonBody,
14 $httpHeaders = null
15 ) {
16 parent::__construct($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders);
17 $this->stripeParam = $stripeParam;
19 // TODO: once Error\Base accepts the error code as an argument, pass it
20 // in the call to parent::__construct() and stop setting it here.
21 $this->stripeCode = $stripeCode;
23 // This one is not like the others because it was added later and we're
24 // trying to do our best not to change the public interface of this class'
25 // constructor.
26 // TODO: make this a proper constructor argument in the next major
27 // release.
28 $this->declineCode = isset($jsonBody["error"]["decline_code"]) ? $jsonBody["error"]["decline_code"] : null;
31 public function getDeclineCode()
33 return $this->declineCode;
36 public function getStripeParam()
38 return $this->stripeParam;