Jump to content
Sign in to follow this  
devosc

[Contribution]Paypal IPN - Devosc

Recommended Posts

I'm going to try and respond courteously since you're obviously new (or forgot your manners) and you currently lack understanding of osCommerce, the problem is your $language variable.


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

Share this post


Link to post
Share on other sites

first of all, i do like your contribute and the manual to the 3.0a is very good.

 

now i am quite new in here and not a pro at php :D. can u tell me what do you mean by the $language? where can i $language. i have many lang folder and not sure which 1 to look after.

 

 

cheers

Share this post


Link to post
Share on other sites

I can't go through it all, the contrib has various sections etc... however... in catalog/includes/modules/payment/paypal/catalog/checkout_process.inc.php the $language is stored in the db table orders_session_info, this is supposed to be the language that your customer used during their checkout.... so in the case of accepting an order in the admin, the language specified in the table orders_session_info is retrieved and used to call the corresponding language file....

 

But because you're seeing the double slashes '//' means that no language (of type string) is being in set into the orders_session_info file... which is strange; by default the $language is the language of your customer's browser, or whatever language they choose to view your site in.....

 

So checkout as a customer.... then via phpMyAdmin look in orders_session_info and see what language is being inserted into the column 'language'.... it should not be empty.

 

It's a bit hard to say why you're having this problem since if $language has no value then this error would occur elsewhere also in your site etc...

 

Have you made any changes to the contrib code ?

Edited by devosc

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

Share this post


Link to post
Share on other sites

i use english only in my website only and of corse can don't have to click the accept button, i can choose "process" in the dropdown menu and choose submit then the accept button will dissapear. but still i sit with this prob on a new years day (yes chinese calendar ) and it annoying me a bit LOL.

 

here it what i did, copy the catalog via FTP to the server. then open the files and copy paste /add the code left. and upload those too. that's it.

Share this post


Link to post
Share on other sites

ohh btw, this problem occurs ONLY when i enter the admin site, go to "customers" link and press Paypal IPN to check if there are new payments.

 

if i recieive 1, i will see the data table with a button "accept". now i push "accept" button and boom, get the error (above)

Share this post


Link to post
Share on other sites

sorry mods, but seems i can't edit my post lol.

 

i checked the session as you told me and sure it's english in the database. Now use firefox as web browser and have Swedish at default, then vietnamese and THEN english. i remove the swe and viet lang in firefox and then only use eng as default. guess what, it's the browser.

 

Now i have a small question, what does the accept button anyway? i press it and the page reload, display green color accept. ok now the button din't disapear and i got a message via email. and i don't think this should looks like this:

 

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

 

Unique-Handcraft.com

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

Order Number: 36

Detailed Invoice: http://unique-handcrafts.com/catalog/accou...php?order_id=36

Date Ordered: Tuesday 08 February, 2005

 

EMAIL_TEXT_PRODUCTS

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

1 x Embroidery tablecloth 1 (khan30x30-1) = 0

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

Sub-Total: $5.00

Per Item (Best Way): $2.50

Total: $7.50

 

EMAIL_TEXT_DELIVERY_ADDRESS

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

 

 

,

 

 

EMAIL_TEXT_BILLING_ADDRESS

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

 

 

,

 

 

EMAIL_TEXT_PAYMENT_METHOD

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

 

 

 

and why should it email to users when i push the accept button? because from what i can see i already got 1 after checkout succeed. the email above look not quite ok. LOL.

Share this post


Link to post
Share on other sites

Well after several orders where I lost the customer cart, I finally broke down and installed IPN. Firtstly, thank you all for your hard work and the excellent instructions that are included REALLY helped alot. Everything seems to work fine, except when I goto admin/cutsomers/orders, I get the following error:

 

Parse error: parse error, unexpected '<' in /.../.../public_html/admin/orders.php on line 206

 

Here is my code starting with the IPM mod, can anyone help me see what is wrong please?

 

//begin PayPal_Shopping_Cart_IPN

if (strtolower($order->info['payment_method']) == 'paypal') {

include(DIR_FS_CATALOG_MODULES . 'payment/paypal/admin/TransactionSummaryLogs.inc.php');

} else {

?>

<td><table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>

<td class="main"><?php echo $order->info['payment_method']; ?></td>

</tr>

<?php

}//else not paypal

//end PayPal_Shopping_Cart_IPN

 

<tr> (THIS IS LINE 206)

<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>

<td class="main"><?php echo $order->info['payment_method']; ?></td>

</tr>

 

Am I just missing something here>? Any help will be very much appreciated, thanks again! TC

Share this post


Link to post
Share on other sites
Well after several orders where I lost the customer cart, I finally broke down and installed IPN. Firtstly, thank you all for your hard work and the excellent instructions that are included REALLY helped alot. Everything seems to work fine, except when I goto admin/cutsomers/orders, I get the following error:

 

Parse error: parse error, unexpected '<' in /.../.../public_html/admin/orders.php on line 206

 

Here is my code starting with the IPM mod, can anyone help me see what is wrong please?

 

//begin PayPal_Shopping_Cart_IPN

if (strtolower($order->info['payment_method']) == 'paypal') {

    include(DIR_FS_CATALOG_MODULES . 'payment/paypal/admin/TransactionSummaryLogs.inc.php');

} else {

?>

    <td><table border="0" cellspacing="0" cellpadding="2">

      <tr>

        <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>

        <td class="main"><?php echo $order->info['payment_method']; ?></td>

    </tr>

<?php

}//else not paypal

//end PayPal_Shopping_Cart_IPN

 

<tr>  (THIS IS LINE 206)

<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>

            <td class="main"><?php echo $order->info['payment_method']; ?></td>

          </tr>

 

Am I just missing something here>? Any help will be very much appreciated, thanks again! TC

 

EDIT

Awe shuxxx right after I posted I saw the problem and got it fixed now, it figures! But anyways, thanks alot I know ALOT of hard work went into this MOD and I for one TOTALLY appreciate it, as will my customers....

Share this post


Link to post
Share on other sites

Just a quick note to anyone who has been having trouble with PayPal not sending IPN's (mine stopped in late January, about the 28th); today I started getting the missing IPN's from the 29th! Of course, I'd already manually filled all those orders and set their status appropriately. Now my customers are wonderinging why their orders went from "shipped" (and in most cases actually delivered) to "processing".

 

Just a heads up out there to keep an eye on your paypal order statuses.

 

Oh, and also be sure to check any incoming PayPal "Order Process" emails; because the old IPN's that you have already probably shipped the orders on will cause one of these to be sent upon receipt of the IPN. (I almost double shipped a couple before I caught on to the fact they were two week old orders.)

Share this post


Link to post
Share on other sites

Hello,

 

Which are modification brought so that CCGV works correctly with Paypal V3a in the catalog and also in the admin

 

Thank you for your answer


IEUFLR2000

Share this post


Link to post
Share on other sites

catalog/includes/modules/payment/paypal/catalog/checkout_process.inc.php

 

At the bottom of the script you'll see some comments about ccgv, replace it with this:

  if(is_callable(array($order_total_modules, 'apply_credit')))
   $order_total_modules->apply_credit();

Edited by devosc

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

Share this post


Link to post
Share on other sites
catalog/includes/modules/payment/paypal/catalog/checkout_process.inc.php

 

At the bottom of the script you'll see some comments about ccgv, replace it with this:

 ?if(is_callable(array($order_total_modules, 'apply_credit')))
? ?$order_total_modules->apply_credit();

 

Thank you very much Devosc, I am appreciative you with the .htaccess of the last week

 

THX


IEUFLR2000

Share this post


Link to post
Share on other sites
Just a quick note to anyone who has been having trouble with PayPal not sending IPN's (mine stopped in late January, about the 28th); today I started getting the missing IPN's from the 29th! Of course, I'd already manually filled all those orders and set their status appropriately. Now my customers are wonderinging why their orders went from "shipped" (and in most cases actually delivered) to "processing".

 

Just a heads up out there to keep an eye on your paypal order statuses.

 

Oh, and also be sure to check any incoming PayPal "Order Process" emails; because the old IPN's that you have already probably shipped the orders on will cause one of these to be sent upon receipt of the IPN. (I almost double shipped a couple before I caught on to the fact they were two week old orders.)

 

 

let say we have a customer who order an item, he pays via IPN. what happens direct after push the button confirm ? does he see the status complete direct or not?

I use 3.0.a and i can see the transactions show "complete" right efter he finnished the purchase. and that display same in Admin site too.

 

i think i need to check more about status and learn when it's ok / not ok to send package to customers

Share this post


Link to post
Share on other sites

I have installed the PayPal IPN... 3.0 contribution and evrything appears to be working except I do not appear to be getting the IPN from PayPal. I am able to use IPN test and it works. I have set everything up in PayPal properly I believe; Auto return=on IPN=enabled etc...

 

I also have a problem where the 'continue' link on the PayPal site only points to http://checkout_success.php.... instead of http://www.mysite.com/che.....

 

Any ideas???

 

Thanks

BC

Share this post


Link to post
Share on other sites
I have installed the PayPal IPN... 3.0 contribution and evrything appears to be working except I do not appear to be getting the IPN from PayPal. I am able to use IPN test and it works. I have set everything up in PayPal properly I believe; Auto return=on IPN=enabled etc...

Well, PayPal has been having troubles lately and I didn't get any IPN's back from 1/28 to 2/7 ... and then on 2/9 I got IPN's from 1/29. But, since 2/7 my IPN's have been coming in. Look up above for the link to the PayPal forums where they are discussing this.

I also have a problem where the 'continue' link on the PayPal site only points to http://checkout_success.php.... instead of http://www.mysite.com/che.....

Your problem might be due to a bad URL on in the return URL field in the "Website Payment Preferences", it must be "https://www.mysite.com/checkout_success.php" for example. You might also check the IPN URL field: however I believe that the IPN module overrides this entry and it's not actually used.

 

Hope this is of some help :)

Share this post


Link to post
Share on other sites

//begin PayPal_Shopping_Cart_IPN
    tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
  } else if ((isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'success')) {
    PayPal_osC::reset_checkout_cart_session();
  }
//end PayPal_Shopping_Cart_IPN

 

Since on one can help then if i removed the above code from checkout_success.php.

 

Would this be ok?

Share this post


Link to post
Share on other sites
You can see here that PayPal is telling me all is OK on their end, but users of two different Paypal IPN modules on osC are having the same problems:

 

http://www.paypaldev.org/topic.asp?TOPIC_ID=8423

 

I also noted that several people who are not using osC (their code pasts were not even PHP) and having identical problems. And very likely nothing changed on their end. Exactly what happened to me. Luckily they are back to working.

 

PS: Thanks to whomever it was that thought ahead to check for duplicate IPN's : I am now getting 3-5 duplicate IPNs per transaction. I'm not complaining tho... better than none!

Edited by lane

Share this post


Link to post
Share on other sites

I just got a good IPN and a return to my site from PayPal. Maybe they have it fixed, even though it was not broken.


Rik Rasmussen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×