Buy Now
Sign in

PayPal Pro Transaction ID in Email and Saved to Database

melvins138 , July 18 2017
melvins138
Hello,

I have a donation form that will utilize the PayPal Pro processor.

On Success, an email is sent to me with some basic information from the form.

I would also like to include the PayPal Transaction ID in that email. I also would like to save it to the database.

I included:

<?php
echo'<div> $form->data: '.print_r( $form->data, true).'</div>';
?>


At the bottom of my email, and it gives me ALL the information, which I don't need. I only want the [transaction_id] information from:

[paypal_pro] => Array
(
[transaction_id] => 5HT39097UXXXXXXXX
[error_message] =>
[error_code] =>
[correlation_id] => 4ad5a32fa3315
[avs_code] => Y
[payment_status] => SUCCESS
)


Is this possible?

Thanks,
Ryan
GreyHead
Hi Ryan,

Please try {paypal_pro.transaction_id} in the Email template.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
melvins138
Hi Bob,

My client switched to Authorize.net, but I still need the transaction ID.

I added {authorize_net.transaction_id} to the email, but it returned blank.

I based this off of your suggestion, and the change in the debug information in the email:

[authorize_net] => Array
(
[response_code] => Approved
[response_subcode] => 1
[response_reason_code] => 1
[response_reason_text] => (TESTMODE) This transaction has been approved.
[approval_code] => 000000
[avs_result_code] => P
[transaction_id] => 0
)

Suggestions?

Thanks,
Ryan
GreyHead
HI Ryan,

It looks as if the transaction ID there is 0 which may not be helpful. How des ANet return the ID?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
melvins138
I'm not sure how AuthNet returns IDs.

Right now I am in sandbox/testing using a dummy account I created, and that is all it is giving me.

Shouldn't the ID being returned be 0 in the email because it comes back from AuthNet as 0?

Once the client gives me their account and I do tests, it may give me more.
GreyHead
Hi melvins138,

I don't see an ANet Transaction ID in the API reference?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much