PayPal Pro missing parameters (add standard getters)
state_province, country and ip_address are not always set properly for paypal pro due to inconsistency with parameters being passed. https://github.com/civicrm/civicrm-core/pull/12038
state_province, country and ip_address may not be passed to payment processor.
This applies to ALL payment processors:
- If state_province and country were passed from the payment form in one way or another, they will be presented in a consistent format to the payment processor.
- Add client ip_address to the list of parameters so payment processors don't have to retrieve this manually if they require it (paypal pro wants it but was not retrieving it).
This PR adds three generic "getters" to CRM_Core_Payment per @eileenmcnaughton suggestion. For compatibility, no parameters are removed but additional parameters may be set depending on what is passed in. For example if only country_id is defined, then country will be set as well.
This fixes a real issue identified with the paypal pro processor in core, but the inconsistency of parameters passed affects other processors and means each processor has to do extra coding to make sure that the parameters are in the right format when they are passed in. See for example: https://civicrm.stackexchange.com/questions/24316/paypal-pro-billing-address-state-province-country-not-being-passed