Jump to content
Sign in to follow this  
devosc

PayPal_Shopping_Cart_IPN

Recommended Posts

Guest

Thank you so much for responding, Greg.

 

Dumb question - what does commenting out and uncommenting mean? Deleting?

Share this post


Link to post
Share on other sites

In catalog/includes/modules/payment/paypal/application_top.php

You'll see near the top

    //error_reporting(E_ALL & ~E_NOTICE);
   error_reporting(0);

Change it to:

    error_reporting(E_ALL & ~E_NOTICE);
   //error_reporting(0);

Where the first line is now uncommented and the second has been commented out.

A single line comment starts with //

Whereas a multiple line comment is enclosed by /* */ see the copyright notice at the top of that script for an example.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
Guest

Ahhh, makes sense. Thank you. :)

Share this post


Link to post
Share on other sites
Guest

Somehow in the manipulating to try to get this to work I lost John Doe's order. Still have him listed as a customer. Do I need his order to run the test and if so, how do I readd it?

Share this post


Link to post
Share on other sites
99.5% of the time when the IPN Test works but then the IPN doesn't work in in 'Live Mode' is because the Primary Email address and the Business ID are not configured correctly, below is what the PayPal_Shopping_Cart_IPN documentation says in step 5:
# E-Mail Address

Enter your Primary PayPal email address here.

 

# Business ID

If you have configured a secondary email address to be your business email address in your PayPal profile account,

then enter this here, otherwise enter the one used above.

You're my HERO!!

I had a different email address for customer service in the business information section on paypal.

 

It's working perfectly now!!

:D :D :D :D


If I could think of something witty to say I would add a signature.

Share this post


Link to post
Share on other sites

I'm having a problem with the cart contents not emptying after I use paypal IPN. Now when I complete an order with any other payment option it does empty the contents out...just not with paypal.

 

Any idea on how to fix this?

Share this post


Link to post
Share on other sites
Guest
Somehow in the manipulating to try to get this to work I lost John Doe's order. Still have him listed as a customer. Do I need his order to run the test and if so, how do I readd it?

Still having trouble with this one. Can any one suggest what to do?

Share this post


Link to post
Share on other sites

Dawn,

 

Did you try to checkout out a test order and run the paypal test on in it? If you can first answer your own question "Do I need his order to run the test" it would make things easier for you.

 

I do believe you need *an* order, but i don't think there is any requirement that it must be John Doe.

Share this post


Link to post
Share on other sites
Guest

I jsut installed the Paypal contrib and have an error. I have looked and looked, but can't figure out where it's getting it from.

 

Background:

 

Paypal and PayPal IPN came installed with osc. I wanted to update to the new version. I deleted all old files and reference and installed the new.

 

Now when I get to checkout_process.php I get:

 

Fatal error: Cannot redeclare class order_total in /hsphere/local/home/mitcheka/katlynskornergifts.com/includes/classes/order_total.php on line 14

 

 

I know this is supposed to be a second file or call, but I can't find where it is to be taken out.

 

Can someone please give me a hint?

 

Thanks.

Share this post


Link to post
Share on other sites
Guest

Hi safoo,

 

Thanks for the reply. Yep, ran an order through and no IPN. Guess I tested it so no need for the other test to run? Absolutely no IPN's listed under orders or PayPal IPN. I don't know what I'm doing wrong, I'm not getting any errors but I'm not getting any IPN's either.

Share this post


Link to post
Share on other sites

Dawn,

 

Do you have the module in test mode?

 

(I dont have this module installed..i'm using the old paypal but I'm just throwing out ideas on how I would go about debugging this)

Share this post


Link to post
Share on other sites
Guest

Hello,

 

I have installed this for a customer, who also uses the random order generator. Now, the random order generator has stopped working. Has anyone here integrated these two together? I am getting an order number of 'zero' 0 which then when the next order comes through, it is the same and bombs out with a duplicate key.

Share this post


Link to post
Share on other sites
Guest

Hi Greg!

 

Hope you can help?? I just installed your 2.2 mod on my site and although it took some time to get working, I think I am almost there. Just two problems...I have similar issues as a previous posting from Matthias:

 

OK, now back again to the mailproblem.

I have tested it with and without html and in both cases the copy of the mail to the webmaster is well formated and the importand message to the customer has the "backgroundinfos" on the top of the mail.

 

here again an exampel of a mail.

 

 

CODE 

Return-Path: <wwwrun@server02.rns24.de>

Received: from server02.rns24.de ([62.146.91.106]) by mailin04.sul.t-online.de

with esmtp id 1BIoW1-1AG0nY0; Wed, 28 Apr 2004 14:50:17 +0200

Received: (from wwwrun@localhost)

by server02.rns24.de (8.11.6/8.11.6/SuSE Linux 0.5) id i3SCoOk27041;

Wed, 28 Apr 2004 14:50:24 +0200

Date: Wed, 28 Apr 2004 14:50:24 +0200

Message-Id: <200404281250.i3SCoOk27041@server02.rns24.de>

To: " " <matthias.fahrig@t-online.de>

Subject: Bestellung

From: "Bodyfeelings" <wxxxxter@boxxxxx.de>

MIME-Version: 1.0

X-Mailer: osCommerce Mailer

Content-Type: multipart/alternative;

boundary="=_d304acc5a098a41f213de9de2c8df770"

X-Seen: false

X-TOI-SPAM: n;0;2004-04-28T12:50:23Z

X-NAS-Classification: 0

X-NAS-MessageID: 11888

X-NAS-Validation: {13A0351C-8EF3-40C3-BF9A-E27FFEDBCB00}

 

 

--=_d304acc5a098a41f213de9de2c8df770

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

 

Bodyfeelings

------------------------------------------------------

Bestellnummer: 265

Detailierte Bestellübersicht: http://www.bodyfeelings.de/catalog/account...hp/order_id/265

Bestelldatum: Mittwoch, 28. April 2004

 

Artikel

------------------------------------------------------

6 x Party-Overall (Angebot) (r201650) = 120,00EUR

Gr??e lt. Gr??entabelle M

------------------------------------------------------

Zwischensumme: 120,00EUR

Versandkosten: 0,00EUR

Summe: 120,00EUR

 

Lieferanschrift

------------------------------------------------------

Matthias Fxxxxx

Flixxxxxx. 14

88886 Gxxxx

Deutschland

 

Rechnungsanschrift

------------------------------------------------------

Matthias Fxxxx

Flixxxxxrx. 14

88888 Gxxxx

Deutschland

 

Zahlungsweise

------------------------------------------------------

PayPal

 

 

--=_d304acc5a098a41f213de9de2c8df770

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

 

Bodyfeelings<br>------------------------------------------------------<br>B=

estellnummer: 265<br>Detailierte Bestellübersicht: http://www.bodyfeel=

ings.de/catalog/account_history_info.php/order_id/265<br>Bestelldatum: Mitt=

woch, 28. April 2004<br><br>Artikel<br>------------------------------------=

------------------<br>6 x Party-Overall (Angebot) (r201650) =3D 120,00EUR<b=

r> Gr=F6=DFe lt. Gr=F6=DFentabelle M<br>-----------------------------------=

-------------------<br>Zwischensumme: 120,00EUR<br>Versandkosten: 0,00EUR<b=

r>Summe: 120,00EUR<br><br>Lieferanschrift<br>------------------------------=

------------------------<br>Matthias F<br>Meine Strasse. 14<br>88886 City<br>Deutschland<br><br>Rechnungsanschrift<br>----------------------------=

--------------------------<br>Matthias F<br>Mystreet. 14<br>86888 Gr=

nen<br>Deutschland<br><br>Zahlungsweise<br>-------------------------------=

-----------------------<br>PayPal<br><br>

--=_d304acc5a098a41f213de9de2c8df770--

 

 

 

 

And it makes no different sending the with or without html. It looks the same.

 

You did start to discuss the mail problem in the forum...but it just sort of tailed of without a positive resolution. I was hoping you did find the problem. I have your newest mod installed and the following is happening in a 'real life' purchase test I make:

 

1. I receive the OSC order email (which is just blank content)

2. I recieve the PayPal Notification of Payment email (this is correct and the money is appearing in my PayPal account)

3. I recieve the Debug email (correct content)

4. The customer recieves the PayPal Receipt of Payment

5. The customer receives the OSC order email (correct content)

 

Now, this is the even stranger part. When an order is placed, it appears in the 'orders' table of the database and the 'paypal_ipn_id' field is correctly updated to 1 when the IPN is received, however in the 'orders_status_histrory' table I now have two entries;

 

the first (ie the earliest) is for order no.1 with an 'order_status_id' of 4 (Pending PayPal Notification) and 'customer_notified' is 0 (no)

 

the second is for the same order number (no.1) but this has an 'order_status_id' of 0 and 'customer_notified' is 1 (yes)

 

If you try to log in as the customer and view order history...an order appears but nothing is displayed in the order if you select it!?!

Also, the order does not show in the 'Orders' section in Admin...but does appear as a 'Completed' txn in the PayPal IPN page in Admin

 

This is a long post and I apologies now! I have a good understanding of php and I do have some ideas as to where things are going wrong...but I will not post them now due to length. Greg, if you know of the solution, please could you let me know, other wise I will post back my thoughts and share them with everyone to see if a solution can be found. Has any one else had this error? Would they like to share their thoughts??

 

Thank to all in advance!!

 

Steve

Share this post


Link to post
Share on other sites
Guest
Dawn,

 

Do you have the module in test mode?

 

(I dont have this module installed..i'm using the old paypal but I'm just throwing out ideas on how I would go about debugging this)

Thank you so much for responding, I truly appreciate it. I've tried with test mode on and with it off (and making sure both times that I saved the settings). You're using the old paypal? Are you using the download module as well?

 

I really need to get this finished, I'm 2 wks behind my deadline and getting nowhere. Any advice greatly appreciated.

Share this post


Link to post
Share on other sites

No, I don't use downloads.

 

It seems like you are almost there. Have you made sure the website to receive the IPN is correctly configured in Admin? It seems you are almost there, which may mean you just have a configuration incorrect, such as the email addresses. Why don't you double check all the config stuff and then put it live and try to checkout and make a purchase using paypal. You can just refund yourself from paypal.com after testing, so its no problem. See what happens.

Share this post


Link to post
Share on other sites

Hey can some one tell me where or help me with a naked line feed problem in the mail().

I have this contrib installed but when sending emails at order compleation or from the admin paypal ipn update order status to the custermer i get a naked line feed error and i have been searching this forum for an answer to no avail

 

 

thanks

Share this post


Link to post
Share on other sites
Hi gregbaboolal,

 

i changed

$currencies->currencies[$currency]['symbol_left'].$this->key['mc_gross'] != $order->info['total']

To:

$currencies->currencies[$currency]['symbol_left'].$this->key['mc_gross'].$currencies->currencies[$currency]['symbol_right'] != $order->info['total']

 

but the test page still doesn't show my any information is just a blank php page.

 

also id did this change:

 

echo 'DIR_FS_CATALOG_MODULES'; or change include to require and see if php complains.
[CODE] ?if ($action == 'test') {
? ?include_once(DIR_FS_CATALOG_MODULES . 'payment/paypal/admin_test.php');
? ?exit;
?}

 

the only result i got when i put this sting into the paypal.php (echo 'DIR_FS_CATALOG_MODULES') is a blank page with 'DIR_FS_CATALOG_MODULES'.

 

i also change the Currency into US but i still have the same result.

 

i realy have no idea why this doesn't work ?

Hi,

 

my test page in the admin panel still does not work. i changed a couple of things but i still stuck here.

 

Could someone help me with that ?

Share this post


Link to post
Share on other sites
i try this:

echo 'DIR_FS_CATALOG_MODULES';

in the admin/paypal.php

 

the only what i see is a blank page with: DIR_FS_CATALOG_MODULES

 

any ideas ?

Edited by taz1

Share this post


Link to post
Share on other sites

thanks mates.... i found the prob now ... there was a error in the sql tables ...

Share this post


Link to post
Share on other sites
Guest
No, I don't use downloads.

 

It seems like you are almost there. Have you made sure the website to receive the IPN is correctly configured in Admin? It seems you are almost there, which may mean you just have a configuration incorrect, such as the email addresses. Why don't you double check all the config stuff and then put it live and try to checkout and make a purchase using paypal. You can just refund yourself from paypal.com after testing, so its no problem. See what happens.

Thank you for responding. :)

 

Checked and double-checked my configurations and can't find what I'm doing wrong. Am live, able to purchase items ok, but no IPN numbers are showing up in the orders or PayPal section. And still can't get the download thing working either. So either these modules are clashing or I am overlooking something simple from staring at it for so long.

Share this post


Link to post
Share on other sites
Hi Guys,

 

In regard to the fix Noel has identified and suggested, it would be preferable to not have to change anything in the original osC catalog/checkout_process.php script, so in paypal/checkout_process.php where it says,

 

 ?require(DIR_WS_CLASSES . 'order_total.php');
?$order_total_modules = new order_total;

Could someone try changing it to:

if(!class_exists('order_total')) {

? include(DIR_WS_CLASSES . 'order_total.php');

? $order_total_modules = new order_total;

}

This will first check to see whether the 'order_total' class exists already and if not then will create it as usual, you would then need to add $order_total_modules to the list of globals at the top of the file so that it can access the original one.

Haven't had time to test yet....

Greg - Did anybody test this yet? I'll be happy to, I just have to prepare for some downtime to properly test this. But I'd be happy to.

 

I understand about the core code thing too, but I've made so many mods to every file, I don't imagine any of them ar ethe same by this point, except maybe mime.php...

 

I'll give it a go and let you know how it works out...


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

Hi Noel,

 

I tested it on an installation which didn't have the CCGV contrib installed and it didn't hinder the process. I'm pretty sure it will be ok, from the above just need to include the call to the $order_total_modules->process() function, e.g.

if(!class_exists('order_total')) {
 include(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_totals = $order_total_modules->process();
}

Let us know if there any problems etc, I'll include it in the next release, but I'm waiting untill I've got some time to sort out the 'Cart Test' (numerical formatting/currency) before updating the contrib.

 

Many Thanks.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Hi All,

 

For those running v2.2, in catalog/includes/modules/payment/paypal/checkout_update.php

 

Change

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
To
tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

This revision will correctly place the customer's name in the email send to header, whether this will correct an issue reported of the email header contents appearing in the body of the email I'm not sure about at present, maybe someone could provide some feedback.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Also,

 

In catalog/includes/modules/payment/paypal/processing.tpl.php

 

Change

$logo = (MODULE_PAYMENT_PAYPAL_STORE_LOGO_IMAGE_NAME) ? MODULE_PAYMENT_PAYPAL_STORE_LOGO_IMAGE_NAME : STORE_LOGO ;

To

$logo = (MODULE_PAYMENT_PAYPAL_STORE_LOGO) ? MODULE_PAYMENT_PAYPAL_STORE_LOGO : STORE_LOGO ;

This will correctly use the store image logo specified for use on the PayPal site during the checkout.

 

Another revision so as to enable the 'Cart Test' to correctly be performed when using prices where the currency symbol occurs on the right is in catalog/includes/modules/payment/paypal/ipn.php

Change

$currencies->currencies[$currency]['symbol_left'].$this->key['mc_gross']

To

$currencies->currencies[$currency]['symbol_left'].$this->key['mc_gross'].$currencies->currencies[$currency]['symbol_right']

 

Another minor amendment would be in catalog/includes/modules/payment/paypal/ipn.php

Change

@fclose($log);

To

@fclose($fp);

 

I think the above will bring the contribution to upto scratch, with the exception of looking into the formating of the numerical paypal.mc_gross to match that of the osC.order->total when the amount is in the thousands range due to the comma delimeter. Assuming that the 2 decimal place requirement is no longer an issue?

 

Let us know if there are any other suggestions etc...


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×