Payment function with too many parameters
I'd group the parameters:

doDirectPayment(CreditCard $card, User $user, array $options = array())


But this doesn't solve all problems.  

To mark something required you'd use interface, but the interface can only force the existence of the methods, not the properties.

So the best option seems to be forcing the params in the constructor:

class CreditCard {
     public function __construct($required1, $required2 /*, etc*/);
}


But this way you can't instantiate the object without providing options (no fluent interface).

You may mark the params optional and provide some validation method. The problem is, how to automatically call this method. Maybe some SPL interface may help here.



From Fowler's Refactoring:


  Long Parameter Lists
  
  Too many parameters. Functionality is wrong, or not enough use of
  fields
  
  Hinders: comprehension, use, adding parameters
  
  Main Refactoring: Replace Parameter with Method, Preserve Whole Object, Introduce Parameter Object




Looks like most of those params will come from the user filled form, so you could simply do:

doDirectPayment(PaymentForm $form, array $otherOptions = array()) {
    // ...
    foreach ($form-&gt;getValues() as $name =&gt; $value) {
        $client-&gt;setParameterGet(strtoupper($name), urlencode($value));
    }
    // ...
}