src/Models/CreditCard.php
private function storeInput($values)
    {
        $this->name = trim($values['name']);
        $this->number = trim(str_replace(" ","",$values['number']));
        $this->expiration_month = sprintf("%02d", $values['expiration_month']);
        $this->expiration_year = trim($values['expiration_year']);
        $this->line1 = trim($values['line1']);
        $this->city = trim($values['city']);
        $this->state = isset($values['state']) ? trim($values['state']) : null;
        $this->zip = trim($values['zip']);
        $this->country = trim($values['country']);
        $this->cvc = trim($values['cvc']);
    }
private function storeInput($values)
    {
        $this->name = trim($values['name']);
        $this->number = trim(str_replace(" ","",$values['number']));
        $this->expiration_month = sprintf("%02d", $values['expiration_month']);
        $this->expiration_year = trim($values['expiration_year']);
        $this->line1 = trim($values['line1']);
        $this->city = trim($values['city']);
        $this->state = isset($values['state']) ? trim($values['state']) : null;
        $this->zip = trim($values['zip']);
        $this->country = trim($values['country']);
        $this->cvc = trim($values['cvc']);
    }
private function storeInput ( $ values ) { $ this -> name = trim ( $ values [ 'name' ] ) ; $ this -> number = trim ( str_replace ( " " , "" , $ values [ 'number' ] ) ) ; $ this -> expiration_month = sprintf ( "%02d" , $ values [ 'expiration_month' ] ) ; $ this -> expiration_year = trim ( $ values [ 'expiration_year' ] ) ; $ this -> line1 = trim ( $ values [ 'line1' ] ) ; $ this -> city = trim ( $ values [ 'city' ] ) ; $ this -> state = isset ( $ values [ 'state' ] ) ? trim ( $ values [ 'state' ] ) : null ; $ this -> zip = trim ( $ values [ 'zip' ] ) ; $ this -> country = trim ( $ values [ 'country' ] ) ; $ this -> cvc = trim ( $ values [ 'cvc' ] ) ; }
Store the input to private vars
@param $values
Store the input to private vars