Payment normalization libraries have a hard job - they want to let you make a payment without caring which processor you're talking to, but different processors require different data for similar operations.
- require all the possible necessary information for all processors
- define a different request class for each different combination of required information
- accept arrays (with normalized parameter names) for requests and indicate which parameters are required at runtime
So far we have gone down road 3, but we don't have a way of marking which parameters are required for which calls
Maybe we could use attributes https://www.php.net/manual/en/language.attributes.overview.php for programatically marking which keys are required for each call. Then the base PaymentProvider class could have a getRequiredParameters call taking the method name and returning an array of required keys.