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

vasike’s picture

Status: Active » Needs work

There's the first commit on this : http://drupalcode.org/project/commerce_cop.git/commit/69b8863
Add fieldable property to payments definitions

vasike’s picture

Status: Needs work » Needs review

another 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.

arosboro’s picture

vasike, 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.

arosboro’s picture

There 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.

  • vasike committed c39851b on 7.x-1.x
    Issue #2220197, #2293025 by arosboro, vasike: Save the payment fields to...
vasike’s picture

Status: Needs review » Fixed

There is a commit for the child issue:

There is a commit that use the related "Drupal Commerce Payment Transaction Fields" issues solution
for saving the payment transaction with the fields data from both checkout and terminal.

So i think we can consider this task/feature - the integration - completed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.