I might have spoken too soon here. I thought I had figured out both the confirm.php and the pp_confirm.php bindings for Transaction ID. And actually, they both work to record the Transaction ID into the database column txn_id.
However, the direct payment process is creating an error_log on the server. I'm not sure it has anything to do with this but it points to it I think.
If I do a test transaction using PayPal Express Checkout, there is no error. However, if I use the direct payment, it generates the following php warning in the error_log file. But the transaction all goes through ok and all emails are sent.
[07-Apr-2020 13:04:59 America/Chicago] PHP Warning: A non-numeric value encountered in /home/domainname/pathtohtml/WA_eCart/Adv_CO_Scripts/PP_DirectPayment_PHP.php on line 335
When I look at line 335 of the PP_DirectPayment_PHP.php file, I see the variable $paramName, which is referenced above line 335, in the function PP_DirectPayment_Result where it is created in a switch statement. The only response I am using from that list of bindings is to insert the Transaction ID into the order table. So I figured I should check to see if it isn't the correct use of that binding or something else is going on.
Here is what that line in the "Store Cart Summary" (on the confirm.php page) behavior looks like.
$ConditionalQuery->bindColumn("txn_id", "s", "".PP_DirectPayment_Result("Transaction ID") ."", "WA_DEFAULT");
Also, I captured the session for PP_DirectPayment. I noticed that the only part that does not include the "psi:type=" is the <TransactionID> in the xml response, but since this all comes from PayPal, maybe is has nothing to do with it. Basically, I was trying to figure this out myself but so far, I'm not finding the problem.
Thanks,
TroyD