Skip to content
Snippets Groups Projects

always pass payment_processor_id to Mjwshared.create_payment

Merged JonGold requested to merge JonGold/mjwshared:fix-to-account into master

There are three code paths that call Mjwshared.create_payment. Two of them pass payment_processor_id, the third doesn't.

When payment_processor_id isn't passed, CRM_Contribute_BAO_Contribution::getToFinancialAccount() simply picks the default Asset financial account, which in turns causes the financial transaction to be incorrect.

I'd go a step further and make payment_processor_id a required parameter of Mjwshared.create_payment but I thought I'd check with you. It's not called in Stripe or Authnet extensions, but as an API I'm not sure if it's called from anywhere outside of Mjwshared. Even if it is, that's more a reason to delay making it a required field than not doing it at all.

Merge request reports

Merged by mattwiremattwire 4 years ago (Mar 25, 2021 9:25am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading