Seeing Order Number in Paypal Pro Details
Hi,
I'm using zen cart 1.38 with PayPal Website Payments Pro
Should I be able to see the order number when looking at transaction details? I have several sites and it can get confusing when looking thru transactions and not knowing what site a payment came from.
Regards,
Barry
Re: Seeing Order Number in Paypal Details
Sorry, not at the present time.
Re: Seeing Order Number in Paypal Details
Thanks- any way if indicating what site or IP address the order came from in Paypal?
Re: Seeing Order Number in Paypal Details
You could try making the following edit to /includes/modules/payment/paypaldp.php, at line 539:
Replace:
Code:
// unused at present:
// $options['CUSTOM'] = '';
// $options['INVNUM'] = '';
// $options['DESC'] = '';
with this:
Code:
// send the store name as transaction identifier, to help distinguish payments between multiple stores:
$options['INVNUM'] = STORE_NAME; // (cannot send actual invoice number because it's not assigned until after payment is completed)
// $options['CUSTOM'] = ''; // reserved for internal use in next version of Zen Cart:
// $options['DESC'] = ''; // reserved for internal use in next version of Zen Cart:
Re: Seeing Order Number in Paypal Pro Details
Cool! I'ts in there, I'll let you know
Incidentally, paypaldp.php is actually in the
/includes/modules/payment dirrectory
Re: Seeing Order Number in Paypal Pro Details
Quote:
Originally Posted by
BarryLegal
Incidentally, paypaldp.php is actually in the
/includes/modules/payment dirrectory
Oops. Typo fixed. :blush:
Re: Seeing Order Number in Paypal Pro Details
Still not showing up. Here's the details I do get:
Item Total:
$114.93 USD
Shipping:
$0.00 USD
Handling:
$0.00 USD
Sales Tax:
$9.34 USD
Total Amount:
$124.27 USD
Fee amount:
-$2.66 USD
Net amount:
$121.61 USD
Date:
Oct 18, 2009
Time:
17:38:44 EDT
Status:
Completed
Payment Type:
Instant
Re: Seeing Order Number in Paypal Pro Details
That's curious.
I tested it myself and it worked great:
Item Total:
$49.99 USD
Shipping:
$2.50 USD
Handling:
$0.00 USD
Sales Tax:
$6.37 USD
Total Amount:
$58.86 USD
Fee amount:
-$2.01 USD
Net amount:
$56.85 USD
Invoice ID:
My Testing Store
Date:
Oct 16, 2009
Time:
09:32:28 PDT
Status:
Completed
Payment Type:
Instant
Re: Seeing Order Number in Paypal Pro Details
Yeah, looks great! that would be exactly what we need :blink:
I checked both orders paid with cc and paypal, still no store name.
I've got this code on line 540 of paypaldp.php:
$options['INVNUM'] = STORE_NAME;
Thanks in advance.
Re: Seeing Order Number in Paypal Pro Details
Did the changes upload to the server successfully?
Re: Seeing Order Number in Paypal Pro Details
Yep, the edited paypaldp.php is up there but still no store name.
I also found the same unused field code block in paypalwpp.php in the same directory & made the edit, I'll let you know if that makes a difference.
Re: Seeing Order Number in Paypal Pro Details
Editing the paypaldp.php file deals with Pro transactions. The paypalwpp.php file deals with Express Checkout transactions. (Ya, I know, the names are confusing ... it's all changed in 2.0)
Re: Seeing Order Number in Paypal Pro Details
Hey Dr Byte- I got the store name in Invoice ID, thanks! :clap:
It's an instant payment, here's what it looks like:
Invoice ID: Giggles.com
Date: Oct 22, 2009
Time: 10:49:16 EDT
Status: Completed
Payment Type: Instant
I'm not sure which file edit did the trick, I'm going to add the code to paypalwpp.php on another of my stores and wee what happens.
Re: Seeing Order Number in Paypal Pro Details
Aha!
Now I'm getting this error:
"Payment has already been made for this InvoiceID"
Oops!:oops:
Re: Seeing Order Number in Paypal Pro Details
That's odd ... I didn't get that in my testing.
However, you can do this instead:
Code:
$options['INVNUM'] = STORE_NAME . ' - ' . time();
That'll add the current time (to the millisecond) to the end of the store name, making it reasonably unique.
Re: Seeing Order Number in Paypal Details
Quote:
Originally Posted by
DrByte
Sorry, not at the present time.
Is this because the order number is generated last? We really need our paypal to contain the zen cart order numbers somewhere in the transaction as well.
Re: Seeing Order Number in Paypal Details
Quote:
Originally Posted by
mteipe
Is this because the order number is generated last?
Mostly, yes.