
Originally Posted by
carlwhat
chad,
in looking at v1.3.0 there is no line 2651.
in addition, the correct path is:
/includes/modules/payment/paypalr.php
i think you are referring to
the code in this block.
if so, that code in a vanilla version of zc v2.x.x (and probably earlier) will never get hit.
that code will only get run IF you are missing the function zen_update_orders_history. you can see
that here.
so if you are running a vanilla version of ZC and want that id in your email, i would recommend using a notifier from the zen_mail method and inserting it there.
best.
Carl,
This is how i was able to put the transaction id on paypair email. What are your thoughts
path: \includes\classes\order.php
find line 1458
Code:
$html_msg['PAYMENT_METHOD_DETAIL'] = (isset($GLOBALS[$_SESSION['payment']]) && is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV);
add right below the above
Code:
// bof paypal transaction id
// ----- Add PayPal Authorization ID to emails if payment method is PayPal -----
if (!empty($_SESSION['payment']) && strpos(strtolower($_SESSION['payment']), 'paypal') !== false) {
global $db;
// Fetch latest PayPal Authorization ID for this order
$txn_check = $db->Execute(
"SELECT txn_id
FROM paypal
WHERE order_id = " . (int)$zf_insert_id . "
ORDER BY date_added DESC
LIMIT 1"
);
$txn_id = (!$txn_check->EOF && !empty($txn_check->fields['txn_id']))
? $txn_check->fields['txn_id']
: 'N/A';
// Append to plain text email
$email_order .= "\nPayPal Authorization ID: $txn_id\n";
// Append to HTML email
if (!isset($html_msg['PAYMENT_METHOD_DETAIL'])) $html_msg['PAYMENT_METHOD_DETAIL'] = '';
$html_msg['PAYMENT_METHOD_DETAIL'] .= '<br><strong>PayPal Authorization ID: ' . htmlspecialchars($txn_id) . '</strong>';
}
// eof paypal transaction id
One question:
When a palpal order is created in the database it creates two order_id with different txn_type.
txn_type: Create
txn_type: Capture
I believe this is just the way paypalr put it into the database. Just wanted to verify