Zen Cart Logo
Forums / Addon Payment Modules / Paypal IPN Payment Details

Paypal IPN Payment Details

Locked

Views: 2,831

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
26 Nov 2006, 9:47 PM
#1
noutje avatar

noutje

New Zenner

Join Date:
Mar 2005
Posts:
31
Plugin Contributions:
0

Paypal IPN Payment Details

When an order is received in store that is payed with paypal. There is missing some info.
E.G. Shipping costs is 0.00 , the state is missing, invoice, num_cart_items etc..

Now I see in the paypal.php file that this information is commented out, shipping costs is hard coded to 0.00 and was previous :

 zen_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

commented out is :

zen_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

And this was changed to:

zen_draw_hidden_field('amount', number_format(($this->totalsum) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

What will happend when I change these values back to the original state they used to be?

I want for sure that shipping costs are shown to the customer at the paypal website.

27 Nov 2006, 3:37 PM
#2
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Paypal IPN Payment Details

Yes, you can reverse those two lines for shipping (ie. uncomment/comment) and shipping will then show in Paypal (in my experience, anyway).

There may be a reason why it's coded like that though - eg. it may not always work with all types of shipping, so it's a case of trying it and seeing if it works with your setup, perhaps. :smile:

9 Jan 2007, 6:35 AM
#3
characterdriven avatar

characterdriven

New Zenner

Join Date:
Dec 2006
Location:
Vancouver Island, BC
Posts:
53
Plugin Contributions:
0

Re: Paypal IPN Payment Details

I've been looking for an answer re: PayPal as order number keeps getting recorded as '1' on PayPal invoice, then that information is used on Zen Cart. I've been trying various things to solve this, but can't figure out how to get Zen Cart invoicing system to over-ride this. When I saw this thread, I wanted to be able t have the shipping show up, too, but am not well enough versed in PHP to really get how to do this. Both issues need to be resolve so any help would be appreciated.:cry:

https://www.characterdriven.com
Character Driven Media

https://www.narnia-productions.com
Stage, Screen and Event Services and Supplies

9 Jan 2007, 6:39 AM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Paypal IPN Payment Details

You cant,
the order number passed to paypal is 1, this is because the order number isnt generated until After the order comes back,

the other things are commented out because there have been issues in the past, and the customer gets a line item invoice from Zen Cart.

Zen cart PCI compliant Hosting

9 Jan 2007, 9:32 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Paypal IPN Payment Details

The PayPal IPN module has that limitation.
If you use PayPal Express Checkout, the line-item and subtotal details are sent as expected (unless there are any credits such as coupons, etc which change the subtotal amounts).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

10 Jan 2007, 7:22 AM
#6
characterdriven avatar

characterdriven

New Zenner

Join Date:
Dec 2006
Location:
Vancouver Island, BC
Posts:
53
Plugin Contributions:
0

Re: Paypal IPN Payment Details

Merlinpa1969:

You cant,
the order number passed to paypal is 1, this is because the order number isnt generated until After the order comes back,

the other things are commented out because there have been issues in the past, and the customer gets a line item invoice from Zen Cart.

Thanks. Thought it was something I hadn't configured properly.

https://www.characterdriven.com
Character Driven Media

https://www.narnia-productions.com
Stage, Screen and Event Services and Supplies

15 Jan 2007, 5:27 AM
#7
lucidlee avatar

lucidlee

Zen Follower

Join Date:
Aug 2005
Location:
Bondi, Australia
Posts:
101
Plugin Contributions:
0

Re: Paypal IPN Payment Details

Merlinpa1969:

You cant,
the order number passed to paypal is 1, this is because the order number isnt generated until After the order comes back,

the other things are commented out because there have been issues in the past, and the customer gets a line item invoice from Zen Cart.

Merlinpa, after reading your comments above, am I right in assuming that for a given PayPal based order that it won't appear as an order until PayPal returns?

I say this because of the weirdness I've experienced in the last two orders. In the first a customer ordered and paid via e-cheque, which PayPal tells me will take 4 days to clear and, given your explanation, I should expect an auto generated order to appear at that time.

OTOH it could also be that the PayPal install is faulty somehow except that I've just received an order from another customer who paid via credit card on PayPal which instantly cleared and the order generated as per usual except that the Order # is 0, which it has been for some weeks now probably since upgrading to 1.3.5 BTW looking at the PAYPAL schema shouldn't PAYPAL.paypal_ipn_id be autoincrementing instead of defaulting to 0?

The Fifth Element
Our Zen-Cart sells Zen Charts!!

15 Jan 2007, 5:36 AM
#8
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Paypal IPN Payment Details

Yes it should be auto incrementing,
you may want to try using the zen admin to remove the paypal module then re-install it in the admin, this will set any changes that took place during the recent upgreade

Zen cart PCI compliant Hosting

15 Jan 2007, 5:39 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Paypal IPN Payment Details

Clarification ... In the "paypal" table, the paypal_ipn_id field should be auto_incrementing.
In other tables which have a field by the same name, those are not auto-incrementing.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Jan 2007, 2:31 PM
#10
lucidlee avatar

lucidlee

Zen Follower

Join Date:
Aug 2005
Location:
Bondi, Australia
Posts:
101
Plugin Contributions:
0

Re: Paypal IPN Payment Details

DrByte:

Clarification ... In the "paypal" table, the paypal_ipn_id field should be auto_incrementing.
In other tables which have a field by the same name, those are not auto-incrementing.

OK so examining my PAYPAL table I notice that autoincrementing stopped at the same time that txn_type stopped being "web_accept" and started being "unique", which I think was the 1.3.5 upgrade for me. Is there a connection?

Also I uninstalled and reinstalled the module but the tables don't appear to have been affected. I assume one must manually drop tables to be rid of them. Would the module then install from scratch? Of course my data is gone but I assume much else happens with a fresh install. Perhaps this is a consequence of not following the upgrade instructions to the letter ie creating a fresh db and uploading the old data but I fail to see how a standard SQL backup (structure + data) would not just recreate the old db.

I've just fixed the autoincrement and chased the updated paypal_ipn_id into Table PAYPAL_STATUS_HISTORY but don't know which other tables to update. Where is it used?

The Fifth Element
Our Zen-Cart sells Zen Charts!!

18 Jan 2007, 6:40 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Paypal IPN Payment Details

Some backup/restore actions, depending on the options you select (esp when choosing MySQL Compatibility modes), can lose your autoincrement settings.

You can restore those by manually running the zc_install/sql/db_rebuild_autoincrement.sql script to repair the known ones.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.