1: <?php
2:
3: namespace MaxMind\MinFraud\Model;
4:
5: /**
6: * Class CreditCard
7: * @package MaxMind\MinFraud\Model
8: *
9: * @property string $country This property contains an {@link
10: * http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 country
11: * code} representing the country that the card was issued in.
12: *
13: * @property boolean $isIssuedInBillingAddressCountry This property is true if
14: * the country of the billing address matches the country that the credit card
15: * was issued in.
16: *
17: * @property boolean $isPrepaid This property is true if the card is a prepaid
18: * card.
19: *
20: * @property \MaxMind\MinFraud\Model\Issuer $issuer An object containing
21: * information about the credit card issuer.
22: *
23: */
24: class CreditCard extends AbstractModel
25: {
26: /**
27: * @internal
28: */
29: protected $issuer;
30:
31: /**
32: * @internal
33: */
34: protected $country;
35:
36: /**
37: * @internal
38: */
39: protected $isIssuedInBillingAddressCountry;
40:
41: /**
42: * @internal
43: */
44: protected $isPrepaid;
45:
46: public function __construct($response, $locales = array('en'))
47: {
48: $this->issuer = new Issuer($this->safeArrayLookup($response['issuer']));
49: $this->country = $this->safeArrayLookup($response['country']);
50: $this->isIssuedInBillingAddressCountry
51: = $this->safeArrayLookup($response['is_issued_in_billing_address_country']);
52: $this->isPrepaid = $this->safeArrayLookup($response['is_prepaid']);
53: }
54: }
55: