I'm currently working on an issue in the Webform Pay project that would keep track of the Pay module transaction information in the webform_submitted_data table (so that we could link to the Pay transaction from the Webform submission). However currently this seems to be very difficult to accomplish because the $transaction object is never passed along in the form_submit() handler. This patch adds the pay transaction into $form_state for later reference.
I'm not positive that this approach is 100% correct, but it seems to make sense that only one $form_state['pay_transaction'] item is needed because the single transaction can store all the actions from multiple payment methods. The $form_state['pay'] array also seems to be well structured right now with payment methods nicely keyed by pid.
| Comment | File | Size | Author |
|---|---|---|---|
| pay_transaction.patch | 816 bytes | quicksketch |
Comments
Comment #1
quicksketchComment #2
allie mickaHi quicksketch!
At some point in the recent past, we began stashing activities in $form_state:
The activity can get its $transaction, so I think you're covered. I recall having good motives for using $activity rather than $transaction, but I don't really remember what those motives were offhand.
Do you find this sufficient for your needs?
Comment #3
allie mickaI'm going to go ahead and won't-fix this, since transaction info is derivable from activity, which is already in form_state.