Hi,
I'm integrating a third party payment processor with Gravity Forms. I'm trying to keep things as simple as possible but am unsure what the right way to approach a specific issue might be.
Currently, I've added a gform_validation hook, which validates the credit card and returns an authorisation code. I'd like to add that data to Gravity Forms in such a way that it
a) appears in the email received by the customer
b) appears in the admin area and can be exported as part of the general export functionality
I've tried to use the gform_entry_created hook but the first issue I hit was that I couldn't see the Form Object -
add_action('gform_entry_created', 'update_txcode');
function update_txcode($entry,$form) {
echo '<pre>';
var_dump($form);
echo '</pre>';
}
The above code just returned NULL.
I then tried manually updating the meta within that function (to see what would happen) -
gform_update_meta($entry['id'], 'transaction_id', "ABCDEFG");
I could see the new data created in the rg_lead_meta table but couldn't see how to add it to the email or display it on the front end.
I'd really appreciate if you could tell me what I'm doing wrong, or recommend a better workflow.
Many Thanks.
Michael