forked from stripe/stripe-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.php
41 lines (35 loc) · 1.06 KB
/
Card.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Stripe\Error;
class Card extends Base
{
public function __construct(
$message,
$stripeParam,
$stripeCode,
$httpStatus,
$httpBody,
$jsonBody,
$httpHeaders = null
) {
parent::__construct($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders);
$this->stripeParam = $stripeParam;
$this->stripeCode = $stripeCode;
// This one is not like the others because it was added later and we're
// trying to do our best not to change the public interface of this class'
// constructor. We should consider changing its implementation on the
// next major version bump of this library.
$this->declineCode = isset($jsonBody["error"]["decline_code"]) ? $jsonBody["error"]["decline_code"] : null;
}
public function getDeclineCode()
{
return $this->declineCode;
}
public function getStripeCode()
{
return $this->stripeCode;
}
public function getStripeParam()
{
return $this->stripeParam;
}
}