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

Payment instrument ID is not required at processorform level #17510

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Jun 5, 2020

Overview

The paymentInstrumentID parameter is not required in CRM_Core_Payment_Form::buildPaymentForm() but if it is not set it throws PHP warnings.

Found during development of #17508

Before

PHP warnings if not set.

After

No warnings.

Technical Details

Comments

@civibot
Copy link

civibot bot commented Jun 5, 2020

(Standard links)

@civibot civibot bot added the master label Jun 5, 2020
@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton
Copy link
Contributor

I think we've been working on the assumption it IS required at the payment processor level.

Can we lock in that it IS required? The architectural assumption is that there is a processor per payment method, - so IATS direct debit is a different processor than IATS credit card

@mattwire
Copy link
Contributor Author

mattwire commented Jun 6, 2020

@eileenmcnaughton Can you take another look - I think you've misunderstood this. The default paymentInstrumentID comes from the paymentprocessor object (the second param to buildPaymentForm) but it can be overridden by setting the last parameter (which defaults to NULL if not set).

The change in this PR allows us to NOT set the override on the form. I found this as part of the eventcart development but I hope to follow up with a fix for https://lab.civicrm.org/extensions/smartdebit/-/issues/2 which should allow us to align with your comments.

@eileenmcnaughton
Copy link
Contributor

Yes! You are right!

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.

3 participants