transaction details showing in note field?
on packing slips for orders paid by PP express, the paypal transaction details (total, order ID#, etc) are showing up in the 'note' field.
this makes it hard to find actual notes that customers leave about their orders.
the info does not show up for paypal IPN orders. (yes i have both modules turned on. i wanted to offer the greater speed for paypal users, but didn't want to lose the ability to sell to people without paypal accounts. tweaked the payment descriptions to make this clear during checkout)
anyway, i don't want these PPexpress details to show on the packing slips. how do i turn them off?
Re: transaction details showing in note field?
I don't recommend it, but if you insist, find this section of code, and add // before the $db->Execute line as shown:
Code:
function after_process() {
global $insert_id, $db;
// update OSH records for this order
$sql = "UPDATE ".TABLE_ORDERS_STATUS_HISTORY. "
SET comments = concat(if (trim(comments) != '', concat(trim(comments), '\n\n'), ''),
'Transaction ID: :transID " .
(isset($this->responsedata['PPREF']) ? "\nPPRef: " . $this->responsedata['PPREF'] : "") .
(isset($this->responsedata['AUTHCODE'])? "\nAuthCode: " . $this->responsedata['AUTHCODE'] : "").
"\nPayment Type: :pmtType " .
"\nTimestamp: :pmtTime " .
"\nPayment Status: :pmtStatus " .
" :AVS " .
"\nAmount: :orderAmt ')
WHERE orders_id = ".(int)$insert_id;
$sql = $db->bindVars($sql, ':transID', $this->transaction_id, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtType', $this->payment_type, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtTime', $this->payment_time, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtStatus', $this->payment_status, 'noquotestring');
$sql = $db->bindVars($sql, ':AVS', ($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : ''), 'noquotestring');
$sql = $db->bindVars($sql, ':orderAmt', $this->amt, 'noquotestring');
// $db->Execute($sql);
Re: transaction details showing in note field?
thanks for the quick reply!!
may i ask... why don't you recommend it? possible side effects include... ?
and i apologize if this is a simple question, but where should i be looking for said code? modules/payment/paypal?? document name?
Re: transaction details showing in note field?
/includes/modules/payment/paypalwpp.php ... somewhere around lines 700-800
the code and the line numbers will change in the next release
My reason for not recommending are multifold. The main reason is that the customer has the right to know the auth code of their transaction, and the PayPal timestamp of the order, etc. Having that information visible authenticates the transaction as having been completed via PayPal, and not just marked as "paid" by your website. It's akin to giving them a CC receipt along with their printed invoice/receipt for goods purchased.
Re: transaction details showing in note field?
those are good reasons. but we have found that the customer receiving the auth code in their paypal email was good enough for them; and the admin site having the auth code in the admin area, as happened in earlier releases, was good enough for us. ;)
the way you describe it does make a good argument for the info showing up on the invoices. when a customer gets a hard copy of their order details it's nice to include all payment info available.
but - particularly when sending orders to a gift recipient - we are of the habit of including packing slips rather than the invoices. this was great b/c there was no financial info on it, and the buyer could include gift messages in their 'note' field at checkout which were printed on the packing slips and included in their gift orders. having the paypal details and totals built into the packing slip makes it TMI to include any printed matter at all in a gift order.
is there a way to turn it on for invoices, and off for packing slips?
i so not classify myself a programmer, and having worked with zencart for the past 18 months has been a constant brain-stretching discovery. i relish all i have learned, but i am not able to customize the core of its workings to this extent. i'm grateful for all the programmers who create it and the community which sustains it!
perhaps i'll make a recommendation/request for the ability to turn this on and off in a future release.
thanks again for your replies!
Re: transaction details showing in note field?
Quote:
Originally Posted by
exittheapple
... - particularly when sending orders to a gift recipient - we are of the habit of including packing slips rather than the invoices. this was great b/c there was no financial info on it, and the buyer could include gift messages in their 'note' field at checkout which were printed on the packing slips and included in their gift orders. having the paypal details and totals built into the packing slip makes it TMI to include any printed matter at all in a gift order.
is there a way to turn it on for invoices, and off for packing slips?
What mods/addons do you have installed ?
How are you printing Packing Slips ?
The default "packing slip" generated by Zen Cart doesn't display any order-history comments.
Re: transaction details showing in note field?
i am printing using the 'batch form print' command in super orders (not version 2.0 yet)
b/c of the amount of orders printed each day it's hard to print without this mod.
it only shows in orders paid for via the paypal express module. i suppose one way around it would be to go back to paypal IPN.
Re: transaction details showing in note field?
/includes/modules/payment/paypalwpp.php
line 673 starts like this:
Code:
function after_process() {
global $insert_id, $db, $order;
// update OSH records for this order (which at outset is only a single record anyway)
$sql = "UPDATE ".TABLE_ORDERS_STATUS_HISTORY. "
SET comments = concat(if (trim(comments) != '', concat(trim(comments), '\n\n'), ''),
'Transaction ID: :transID " .
"\nPayment Type: :pmtType " .
"\nTimestamp: :pmtTime " .
"\nPayment Status: :pmtStatus " .
" :AVS " .
"\nAmount: :orderAmount')
WHERE orders_id = ".(int)$insert_id;
$sql = $db->bindVars($sql, ':transID', $this->trans_id, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtType', $this->payment_type, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtTime', $this->payment_time, 'noquotestring');
$sql = $db->bindVars($sql, ':pmtStatus', $this->payment_status, 'noquotestring');
$sql = $db->bindVars($sql, ':AVS', ($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : ''), 'noquotestring');
$sql = $db->bindVars($sql, ':orderAmount', urldecode($this->responsedata['AMT'] . ' ' . $this->responsedata['CURRENCYCODE']), 'noquotestring');
$db->Execute($sql);
Change that to this:
Code:
function after_process() {
global $insert_id, $db, $order;
// add a new OSH record for this order's PP details
$commentString = "Transaction ID: :transID: " .
(isset($this->responsedata['PPREF']) ? "\nPPRef: " . $this->responsedata['PPREF'] : "") .
(isset($this->responsedata['AUTHCODE'])? "\nAuthCode: " . $this->responsedata['AUTHCODE'] : "") .
"\nPayment Type: :pmtType: " .
"\nTimestamp: :pmtTime: " .
"\nPayment Status: :pmtStatus: " .
($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : '') .
"\nAmount: :orderAmt: ";
$commentString = $db->bindVars($commentString, ':transID:', $this->transaction_id, 'noquotestring');
$commentString = $db->bindVars($commentString, ':pmtType:', $this->payment_type, 'noquotestring');
$commentString = $db->bindVars($commentString, ':pmtTime:', $this->payment_time, 'noquotestring');
$commentString = $db->bindVars($commentString, ':pmtStatus:', $this->payment_status, 'noquotestring');
$commentString = $db->bindVars($commentString, ':orderAmt:', $this->amt, 'noquotestring');
$sql_data_array= array(array('fieldName'=>'orders_id', 'value'=>$insert_id, 'type'=>'integer'),
array('fieldName'=>'orders_status_id', 'value'=>$order->info['order_status'], 'type'=>'integer'),
array('fieldName'=>'date_added', 'value'=>'now()', 'type'=>'noquotestring'),
array('fieldName'=>'customer_notified', 'value'=>0, 'type'=>'integer'),
array('fieldName'=>'comments', 'value'=>$commentString, 'type'=>'string'));
$db->perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
This will force the PayPal comments to be added as a new order-history entry instead of appending them to the existing one.
Re: transaction details showing in note field?
my head swims with appreciation! thank you so much. now i'll sit breathlessly by the cart to test print the next PPexpress checkout.
:-D