I have a method with too many parameters. How would you refactor it?Things I considered so far:pass an array to the object and check for required keys (no code hint, phpdoc, programmer doesn't know which are required)pass an object (silly method with getters and setters, programmer still doesn't know which are required)Here's the method:public function doDirectPayment(    $amount,    $credit_card_type,    $credit_card_number,    $expiration_month,    $expiration_year,    $cvv2,    $first_name,    $last_name,    $address1,    $address2,    $city,    $state,    $zip,    $country,    $currency_code,    $ip_address,    $payment_action = 'Sale'){    $client = $this->getClient();    $client->setParameterGet('METHOD', 'DoDirectPayment');    $month = str_pad(ltrim((string)$expiration_month, 0), 2, '0', STR_PAD_LEFT);    $expiration_date = $month . $expiration_year;    $client->setParameterGet('PAYMENTACTION', urlencode($payment_action));     $client->setParameterGet('AMT', urlencode($amount));    $client->setParameterGet('CREDITCARDTYPE', urlencode($credit_card_type));    $client->setParameterGet('ACCT', urlencode($credit_card_number));    $client->setParameterGet('EXPDATE', urlencode($expiration_date));    $client->setParameterGet('CVV2', urlencode($cvv2));    $client->setParameterGet('FIRSTNAME', urlencode($first_name));    $client->setParameterGet('LASTNAME', urlencode($last_name));    $client->setParameterGet('STREET', urlencode($address1));    if (!empty($address2)) {        $client->setParameterGet('STREET2', urlencode($address2));    }    $client->setParameterGet('CITY', urlencode($city));    $client->setParameterGet('STATE', urlencode($state));    $client->setParameterGet('ZIP', urlencode($zip));    $client->setParameterGet('COUNTRYCODE', urlencode($country));    $client->setParameterGet('CURRENCYCODE', urlencode($currency_code));    $client->setParameterGet('IPADDRESS', urlencode($ip_address));    $response = $client->request(Zend_Http_Client::GET);    return $response;}
Payment function with too many parameters
php