OAuth
6 years ago
Api.php
6 years ago
ApiConnection.php
6 years ago
Authentication.php
6 years ago
Base.php
6 years ago
Card.php
6 years ago
Idempotency.php
6 years ago
InvalidRequest.php
6 years ago
Permission.php
6 years ago
RateLimit.php
6 years ago
SignatureVerification.php
6 years ago
Card.php
41 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Stripe\Error; |
| 4 | |
| 5 | class Card extends Base |
| 6 | { |
| 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; |
| 18 | |
| 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; |
| 22 | |
| 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; |
| 29 | } |
| 30 | |
| 31 | public function getDeclineCode() |
| 32 | { |
| 33 | return $this->declineCode; |
| 34 | } |
| 35 | |
| 36 | public function getStripeParam() |
| 37 | { |
| 38 | return $this->stripeParam; |
| 39 | } |
| 40 | } |
| 41 |