Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a new module Drupal Commerce Payment Transaction Fields that could improve the capabilities of this module.
Ex. Manage Offline payments by Store admins with possiblity to add new data to the payment transactions.
Comments
Comment #1
vasikeThere's the first commit on this : http://drupalcode.org/project/commerce_cop.git/commit/69b8863
Add fieldable property to payments definitions
Comment #2
vasikeanother commit on this : http://drupalcode.org/project/commerce_cop.git/commit/959fa52
Attach Field form elements (field_attach_form functions) to Payment Confirmation form/page.
I'm not sure about including the payment transaction fields for Payment Terminal "Add payment" form
or
To have it in the checkout payment process.
Open to discussions.
Comment #3
arosboro CreditAttribution: arosboro commentedvasike, I currently use this functionality with Payment, as I mentioned in #2212109: Duplication of Payment for Drupal Commerce?. I plan on showing different fields on the Checkout Form and Order Terminal, as I believe there is a use case for having Administrative level fields as well as customer facing fields depending on where the payment form is shown. I will be testing your changes out, and will let you know how it goes before attempting suggested modifications.
Comment #4
arosboro CreditAttribution: arosboro commentedThere is no payment transaction in the form_submit callback that you wrote. It may be possible to create new transaction when the form is generated and then call field_attach_form, with field_attach_submit in the submit_form_submit callback. The form state is not available, but you may be able to provide a dummy form_state by encapsulating $pane_values in an array keyed by 'values'.
Take a look at issue #2272735: Payment Transaction update operation for Custom Fields. I added an update operation to make the custom fields more accessible to any fieldable payment method.
Comment #6
vasikeThere is a commit for the child issue:
So i think we can consider this task/feature - the integration - completed.