Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor additional amounts #285

Merged
merged 7 commits into from
Sep 30, 2023
Merged

Conversation

barspi
Copy link
Contributor

@barspi barspi commented Sep 29, 2023

Improving the additional amounts lib in modules/cmf to allow for more flexible amount type handling (storing String internally instead of enums), and also adding an AdditionalAmountTypeConverter interface so converters to/from CMF values can be implemented.

The following classes in the cmf package have been deprecated in favor of more generic ones in an iso package.

  • AdditionalAmount
  • AdditionalAmountsWrapper

The new AdditionalAmountsWrapper under the org.jpos.iso package is preferred, and a new, more specific CMFAdditonalAmount has been added (extending from the generic org.jpos.iso.AdditionalAmount.

The idea is to have other specific ones in other libraries, such as a MastercardAdditionalAmount that can be used together with the corresponding AdditionalAmountTypeConverter.

@ar ar merged commit 558669e into jpos:master Sep 30, 2023
5 of 7 checks passed
@barspi barspi deleted the refactor-additional-amounts branch September 30, 2023 04:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants