Project60 / Project60/org.project60.banking

Use payment_instrument_id instead of payment_instrument to calculate payment penalty for existing contribution matcher

Open
#499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs funding
Dominant language
PHP
Stars
22
Forks
45
Avg merge
3d 15h
Merged PRs (30d)
7

Description

Currently, the existing contribution matcher uses a field btx.payment_instrument to calculate payment penalty:

https://github.com/Project60/org.project60.banking/blob/4be17a2b308518b69b8b6e4a93823953793fff24/CRM/Banking/PluginImpl/Matcher/ExistingContribution.php#L246

The field btx.payment_instrument has to be filled with the name of the payment instrument. That's error prone, as a payment instrument may be renamed.

I think, the payment penalty should be calculated against the payment instrument id.

For backward compatibility, this should be configurable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CRM/Banking/PluginImpl/Matcher/ExistingContribution.php around line 246, where the existing contribution matcher calculates the payment penalty. Trace how payment instruments and configuration are represented, then determine how the ID-based calculation can preserve the current name-based behavior. Done means the penalty uses payment_instrument_id with a documented compatibility option for existing data.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
payments
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.