Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

I had the same problem. Just enable it directly in the database by setting it s value to true and it will work

Thank you for your help. I'm sorry to ask you this, but how do you enable paypal ipn in the database, through phpmyadmin? where in there? thanks again!

 

Boliviasfinest

Link to comment
Share on other sites

Hi there,

 

Have you installed the MS2 060817 ?.

Are your other Admin settings updating ?.

Hi, I have checked around the admin, and all the other settings are updating, it seems to be only the paypal ipn module that wont update to true. Any ideas?

Thank you very much to you or anyone who can help me solve this.

 

Boliviasfinest

Link to comment
Share on other sites

Did you try removing Paypal IPN (Credit Card / Debit) module and re-installing?

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Hi, I have checked around the admin, and all the other settings are updating, it seems to be only the paypal ipn module that wont update to true. Any ideas?

Thank you very much to you or anyone who can help me solve this.

 

Boliviasfinest

 

Hi again,

 

I checked back through this thread, and if I understand your problem correctly (correct me if I've misunderstood) the issue you have is:

 

1) You can "Install" the paypal IPN module under Admin->Modules->Payment,

so you then see the "Credit/Debit card (via Paypal)" with the options now being "Remove" and "Edit"

 

2) Then you strike the problem when you try to "Edit" the module, and do things like set:

 

"Enable Paypal IPN Module" to True. ... and ofcourse other settings like the "E-Mail Address" etc...

 

If this is what's happening, I strongly suspect that your problem is because of the bug in OsC 060817 which I mentioned above.

 

AlexStudio a few posts back pointed someone to http://www.oscommerce.com/forums/index.php?showtopic=251673

 

The same fix in that thread is also in a STS module fix:

http://www.oscommerce.com/community/contributions,1524

 

I you have the 060817 version of OsC, you really need to apply this fix, it is an absolute must so if you haven't yet, please do this before trying anything else.

 

It is a simple one line fix to two files,

catalog/admin/includes/functions/compatibility.php

catalog/includes/functions/compatibility.php

 

Here it is again exactly as posted previously by Bill Kellum:

 

1. Open the catalog/admin/includes/functions/compatibility.php.

2. At the end of the “do_magic_quotes_gpc” routine, add the following code:

 

reset($ar);

 

It will end up looking like this:

 

function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

 

Please let us know how you go.

Good luck !.

Link to comment
Share on other sites

HI There Thanks ALEXSTUDIO!!

 

Ok, a little confused, I found three files, I have the ipn.php in the ext folder

but I have TWO paypal_ipn.php fiels

 

One in

 

includes/languages/english/modules/payment

and the other in

includes/modules/payment

 

 

Which of the two do i need to alter?

 

Also where abouts in the source code do i need to alter the email?

 

Thanks again, for your help

Link to comment
Share on other sites

includes/modules/payment/paypal_ipn.php is the one. If you're using v2.2 (the latest one), you should only modify ipn.php. Email jobs had been moved to that file since v2.2.

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Thanks for the quick reply

 

Where abouts in the file does it need altering?

 

In the checkout_process.php file its obvious :

 

Somewhere after the section that reads // lets start with the email confirmation about line 222 add:

 

 

// additional text message

$email_order .= "rnThank you for your order! rn Enjoy! rn" .

// end of additional text message

 

 

 

 

 

But , I can't see WHERE in the paypal_ipn.php or ipn.php I need to alter!

 

Sorry :blush:

Link to comment
Share on other sites

But , I can't see WHERE in the paypal_ipn.php or ipn.php I need to alter!

in v2.2 ipn.php around line 209 look for:

// lets start with the email confirmation

Add your message into the $email_order string.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

HI AlexStudio

 

Thanks, but that didn't work

 

I just added as follows to ipn.php

 

// lets start with the email confirmation

// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

$email_order .= "rnThank you for your order! rn Enjoy! rn" .

 

 

 

Now , no email confirmation comes back at all!!

 

Hope there is something else i needed to do? :blink:

Link to comment
Share on other sites

also, (forgot to mention) I noted that on the orders that didn't send out an email (because of the new line i added) the order status shows as Preparing

 

the other orders with no altered email (default) shows as processing

 

On both occasions, the paypal transaction (payment) was made, but different order statuses

 

All i am wanting to do is just add a simple line of text to each email order that goes out, but I am missing something, I am baffled!!

 

Thanks so much for helping me! Hope we can get a solution as I would have thought it would be easy enough to just add a line of text to each email.

Link to comment
Share on other sites

if cusomer compeleted the paypal payment, paypal bring them back to

http://www.mysite.com/shop/login.php

Hi Jason - this means that you drop the session. This is not a specific PayPal problem - I'd advise to check this forum for advice on sessions or to start a new thread to figure out why your shop loses the session. all the best - Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

change the code you added to:

$email_order .= "\nThank you for your order!\nEnjoy!\n";

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

In the install guide PayPal Account Configuration section states:

What is meant by "if you have only shop linked to your PayPal account"?

if you have only ONE shop linked to your PayPal account.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Did you try removing Paypal IPN (Credit Card / Debit) module and re-installing?

Yes, I tried in the store admin to remove and then install again, but it shows up False in the enable right after installing, I go to edit and try to enable, then update and keeps showing false. I have also tried removing all the files from the contribution and uploading them again and installing again at the admin, but same result. This evening I will try what Cliff suggested. I havent been able to try Mega's suggestion because I dont know where to enable through the database, I dont know if its in the phpmyadmin or in the database.php files in the directory.

 

Thanks Alex, and to Mega and Cliff for your suggestions, I will let you know how it goes.

Boliviasfinest

Link to comment
Share on other sites

Hi Jason - this means that you drop the session. This is not a specific PayPal problem - I'd advise to check this forum for advice on sessions or to start a new thread to figure out why your shop loses the session. all the best - Terra

 

Thanks Terra. I do not know why. I'm trying to check the advice in reards of the sessions. I've not installed SSL yet. I have tried to enable disable Prevent Spider Session but no luck.

 

Nevertheless, the stock was actually updated correctly and order confirmation email was sent . everything seems to be o.k. except , it directs to login.php

 

I have no problem with the cash payment method.

 

Could I simply enable Auto Return in the PayPal account and set the return pathway to the checkout_process.php file ? it seems to solve the problem but I'm not sure if I would miss something else.

Link to comment
Share on other sites

I have installed the IPN Mod and when I enter my password in PayPal Sandbox to pay, I receive the following error:

 

This invoice has already been paid. For more information, please contact the merchant.

 

I am only using one osCom store and I have disabled the invoice ID checking (Both of these are the recommended fixes in the help files for this mod). However, problem still remains.

 

It only occurs in the Sandbox (when using the live option of the IPN mod, the problem does not occur) but unfortunately it is necessary for me to use the Sandbox because PayPal will not allow me to have 2 accounts with the same bank account for testing with.

 

Does anyone know a fix for this error occuring in the Sandbox for this mod, besides the 2 options supplied in the mod's help file?

Link to comment
Share on other sites

Hey AlexStudio !! You rock!!

 

It worked!

But

 

How do I changed the position of the text in the emai?

(so its at the bottom, so I can add a message or T&C's)

 

It came out like this:

 

 

MY WEBSTORE

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

Order Number: 23

Detailed Invoice: http://MY WEBSTORE.co.uk/doorsandmore/account_history_info.php?order_id=23

Date Ordered: Tuesday 20 March, 2007

 

Products

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

1 x Penny Test Product = £0.01

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

 

Thank you for your order!

Enjoy!

Sub-Total: £0.01

Per Item (Best Way): £0.00

Total: £0.01

 

Delivery Address

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

david andrews2

5 wenton qwA

sheffield, s25 1nh

South Yorkshire, U

 

Billing Address

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

david andrews2

5 wenton qwA

sheffield, s25 1nh

South Yorkshire, U

 

Payment Method

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

Credit/Debit Card (via PayPal)

 

 

the code i used was

 

// lets start with the email confirmation
// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class
$email_order = STORE_NAME . "\n" . 
EMAIL_SEPARATOR . "\n" . 
EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
EMAIL_SEPARATOR . "\n" . 
$products_ordered . 
EMAIL_SEPARATOR . "\n";
$email_order .= "\nThank you for your order!\nEnjoy!\n";

 

 

 

I guess i put the $email_order .= "\nThank you for your order!\nEnjoy!\n";[/code] line somewhere else, but where do i put it?

 

 

Thanks so much

 

I love you !!!!!!!!!!!!

Edited by davidandrews
Link to comment
Share on other sites

Thanks Terra. I do not know why. I'm trying to check the advice in reards of the sessions. I've not installed SSL yet. I have tried to enable disable Prevent Spider Session but no luck.

 

Nevertheless, the stock was actually updated correctly and order confirmation email was sent . everything seems to be o.k. except , it directs to login.php

 

I have no problem with the cash payment method.

 

Could I simply enable Auto Return in the PayPal account and set the return pathway to the checkout_process.php file ? it seems to solve the problem but I'm not sure if I would miss something else.

 

Hi,

 

I have a very similar Problem. Everything works fine, until I try to return from paypal [sandbox] using the "complete your order confirmation" button. Then I get the login.php page. I've analyzed this and looked into the hidden fiels in the paypal-form. The return address is correct and if I copy it into the browser's address bar and press enter I get the correct page. But if I use the button I get just the login.php-page with a new osCsid. The one in the hidden field is the correct one. Does anybody have an idea?

It wouldn't be so bad if the user wouldn't still have his shopping cart after logging in. I've already searched the entire payment Modules area for session and osCsid, but couldn't find anything... :'(

 

Oliver

Link to comment
Share on other sites

I you have the 060817 version of OsC, you really need to apply this fix, it is an absolute must so if you haven't yet, please do this before trying anything else.

 

It is a simple one line fix to two files,

catalog/admin/includes/functions/compatibility.php

catalog/includes/functions/compatibility.php

 

Please let us know how you go.

Good luck !.

 

It worked !!!

Thanks so so much. I can move on now (at least until the next problem appears!)

You and all the people helping here are so important, sometimes it's not that easy to solve the problems that start showing up...at least not on your own.

Thank you again. No more questions for the moment, I will go ahead to do the testing with Sandbox.

 

Boliviasfinest

Link to comment
Share on other sites

Oh oh, if you want that text placed at the bottom of the email, just define it in the language level file includes/languages/english/modules/payment/paypal_ipn.php MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER.

 

Don't forget to remove the code you added in ipn.php.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Does this populate paypal with the corect item descriptions if multiple items have been bought or does it work the same way as V1.3 and V1.4 and just display the store name?

 

I am currently using 1.3 so should it be as simple as remove the old install and replace it with this new one? The only change I did to 1.3 was the following

FIND 

	$parameters['item_name'] = STORE_NAME;	

REPLACE WITH:

	$parameters['item_name'] = $_SESSION['FixOrder'];

(which I will want to do again if the answer to my first question is a no)

 

and changed the default currency from USD to GBP

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...