Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]Paypal IPN - Devosc


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

Link to comment
Share on other sites

  • Replies 2.1k
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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....

Link to comment
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.)

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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 :)

Link to comment
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?

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...