3 namespace Stripe\Error
;
5 class Card
extends Base
7 public function __construct(
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'
26 // TODO: make this a proper constructor argument in the next major
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
;