Create Machine Name for Payment Processors
Overview
Currently, there is no reliable way to identify a payment processor, as the primary key may change from installation to installation and the name is a field that is manageable by the user and could be changed. Our specific use case is we need to be able to determine reliably if a specific payment processor is used for an extension we're building, that enables users to pay for memberships using recurring contributions, but this may also be needed in future development of CiviCRM payment processors.
How it Works Currently
- Go to create a payment processor
- There isn't a field on payment processor form to reliably identify a payment processor from installation to installation.
How it should work
- There should be a column on payment processors table to identify a specific processor, a machine name that we are certain will not change from installation to installation, unique to each payment processor.
- Go to create a payment processor.
- Form now shows a Key optional field.
- Form validation assures only ASCII alphanumeric characters, underscores and/or dashes are used on Key field.
- If no key is given, system will generate one from the processor's name by stripping non ASCII alphanumeric characters and replacing spaces with underscores (_).
- Key field is visible on payment processors table on civicrm/admin/paymentProcessor.
Acceptance Criteria
- Key field is added to payment processor list, view and edit forms.
- Key field is optional.
- Form validation assures only ASCII alphanumeric characters, underscores and/or dashes are used on Key field.
- Key only appears on payment processor creation and cannot be edited by users after.
- Key is generated by the system on creation if no key is given. Even if created through API/BAO.