Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REF Make the formatParamsForPaymentProcessor function more generic so it can be used more #15280

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

mattwire
Copy link
Contributor

Overview

Currently this useful function that helps standardise parameters passed to the payment processor is limited in where it can be used because it hardcodes the params array as $this->_params.
Because it also returns a specific "fields" array which is used for the profileContact function I've created a new function with a different signature so we don't break backward compatibilty.

Before

Not possible to use formatParamsForPaymentProcessor in many places

After

Possible to use formatParamsForPaymentProcessor in many places

Technical Details

Comments

There are some other bits we could probably pull into this function such as the parsing of credit card expiry date.

@civibot
Copy link

civibot bot commented Sep 11, 2019

(Standard links)

@civibot civibot bot added the master label Sep 11, 2019
@mattwire mattwire changed the title Make the formatParamsForPaymentProcessor function more generic so it can be used more REF Make the formatParamsForPaymentProcessor function more generic so it can be used more Sep 11, 2019
CRM/Core/Form.php Outdated Show resolved Hide resolved
@eileenmcnaughton
Copy link
Contributor

I worked through this locally & was able to reach the same conclusion. Happy for this to be merged with one minor comment fix

@mattwire
Copy link
Contributor Author

Thanks for the review @eileenmcnaughton I've fixed the comment

@eileenmcnaughton eileenmcnaughton merged commit ed3f7d0 into civicrm:master Sep 11, 2019
@eileenmcnaughton
Copy link
Contributor

unrelated fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants