MasterpassCardDetails.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Braintree\Transaction;
  3. use Braintree\Instance;
  4. /**
  5. * MasterpassCard details from a transaction
  6. * creates an instance of MasterpassCardDetails
  7. *
  8. * @package Braintree
  9. * @subpackage Transaction
  10. *
  11. * @property-read string $bin
  12. * @property-read string $callId
  13. * @property-read string $cardholderName
  14. * @property-read string $commercial
  15. * @property-read string $countryOfIssuance
  16. * @property-read string $customerId
  17. * @property-read string $customerLocation
  18. * @property-read string $debit
  19. * @property-read string $durbinRegulated
  20. * @property-read string $expirationDate
  21. * @property-read string $expirationMonth
  22. * @property-read string $expirationYear
  23. * @property-read string $healthcare
  24. * @property-read string $imageUrl
  25. * @property-read string $issuingBank
  26. * @property-read string $last4
  27. * @property-read string $maskedNumber
  28. * @property-read string $payroll
  29. * @property-read string $prepaid
  30. * @property-read string $productId
  31. * @property-read string $token
  32. * @property-read string $updatedAt
  33. */
  34. class MasterpassCardDetails extends Instance
  35. {
  36. protected $_attributes = [];
  37. /**
  38. * @ignore
  39. */
  40. public function __construct($attributes)
  41. {
  42. parent::__construct($attributes);
  43. $this->_attributes['expirationDate'] = $this->expirationMonth . '/' . $this->expirationYear;
  44. $this->_attributes['maskedNumber'] = $this->bin . '******' . $this->last4;
  45. }
  46. }
  47. class_alias('Braintree\Transaction\MasterpassCardDetails', 'Braintree_Transaction_MasterpassCardDetails');