Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Thanks loads

I have added it

 

  define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE', 'Credit/Debit Card (via PayPal)');
 define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION', 'PayPal IPN');
define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER.', 'terms and conditions of use etc etc etc');

 

But it doesn't appear in the email

 

Should code be added elsewhere to "include" the new define?

 

Thanks!

Link to comment
Share on other sites

Change your text definition to:

  define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER', 'terms and conditions of use etc etc etc');

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

Yes, perfect this works !!!!!!!!!!!!!!!!!!!

 

But i can't see where in the code its any different to what I had put????

 

 

How can we guys show our appreciation? Do you accept donations for your work?

 

Thanks again so much its very much appreicated

Link to comment
Share on other sites

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

 

It is exactly what I got here.

 

After checkout, paypalIPN bring the customer to the login.php-page with a new osCsid. It might be something related to the session. I could not figure it out yet.

 

My temporary solution is to go to Paypal - Website Payment Preferences -

 

Turn Auto Return for Website Payments to on and set the return URL

 

as something like, http://mydomain.com/checkout_process.php

 

It works. customer is now redirect to the http://www.mydomain.com/checkout_success.php However, it is differ from the instruction manual of PayPal IPN Payment. in the instruction manual, it reads " you do NOT need to enable Auto Return in your PayPal account as this information is sent automatically by the IPN module " .

 

I'm currently using IPN v 2.2 . if i follow the instruction, do not set the return URL and use only the button generated by Paypal IPN, it return to the store with new osCsid. Perhaps, someone may help.

 

Regards

jason

Link to comment
Share on other sites

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

 

It is exactly what I got here.

 

After checkout, paypalIPN bring the customer to the login.php-page with a new osCsid. It might be something related to the session. I could not figure it out yet.

 

My temporary solution is to go to Paypal - Website Payment Preferences -

 

Turn Auto Return for Website Payments to on and set the return URL

 

as something like, http://mydomain.com/checkout_process.php

 

It works. customer is now redirect to the http://www.mydomain.com/checkout_success.php However, it is differ from the instruction manual of PayPal IPN Payment. in the instruction manual, it reads " you do NOT need to enable Auto Return in your PayPal account as this information is sent automatically by the IPN module " .

 

I'm currently using IPN v 2.2 . if i follow the instruction, do not set the return URL and use only the button generated by Paypal IPN, it return to the store with new osCsid. Perhaps, someone may help.

 

Regards

jason

Link to comment
Share on other sites

As Terra mentioned in her reply, you have sessions problems in your store. What did you set in your includes/configure.php for HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN? Do you have a shared or dedicated SSL certificate?

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 everyone!

 

I am selling downloadable goods and I am having trouble with my order status not being updated.

I did install a few contributions that affected checkout_process... (CCGV, SDS).

Can someone explain to me how I can check if after an order, my IPN was received or not?

 

I am not very familiar with php and databases... :blush:

 

Thank you.

Link to comment
Share on other sites

Hi all.

 

I thought I’d share my solution to a problem I was having. Maybe others are in the same situation and are having the same issue.

 

Anyway…hope it might help someone.

 

 

Background:

 

We installed a new site with osCommerce and installed the latest version of the Paypal IPN module. (v 2.2 for 2.2MS2). We immediately ran into the following problem.

 

Our customers were getting an error that said, "This invoice has already been paid" from Paypal and they could not complete the transaction.

 

After a little looking, we realized we needed the “multi-store/multi-invoice” fix that was included in the contributions files (located in the “help files” folder in the contribution’s tree).

 

Anyway, we followed the instructions and applied the fix. Check out immediately started working, and customers could complete transactions just fine. However, there was a problem.

 

All of the orders were sitting in osCommerce with the status of “pending [Paypal IPN]” and would never change. They just sat there and nothing happened.

 

Well, like many people I’ve seen, this was maddening. Orders coming in...but since all our produces are downloads, customers that couldn’t get their downloads, even though they’d paid. We had to manually update the orders to “Updated” or “Completed” to allow people to get their downloads. The download controller was working…it was the Paypal module/IPN part that wasn’t working.

 

So…

 

The problem:

 

Orders would come in, but anything paid with Paypal would sit as “pending [Paypal IPN]” and would never update. We weren’t getting any error messages.

 

After a lot of work here’s the solution I found:

 

The solution:

 

If you have applied the multi-store/multi-invoice fix that comes with the contribution, there is a flaw in the installation instuctions.

 

The file has two basic parts.

 

First, it says to do the following:

 

In /includes/modules/payment/paypal_ipn.php find this code:

$parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);

 

and change to this:

$parameters['invoice'] = 'K' . substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);

 

choose any letter but keep it to ONE letter only!

 

This is fine. Do it.

 

Next (and this is the tricky part), it tells you do the following:

 

In /ext/modules/payment/paypal/ipn.php just after

curl_close($ch);

}

 

add

$invoice_id = substr($_POST['invoice'],1);

 

and then replace all occurrences of

$_POST['invoice']

 

with

$invoice_id

 

(use a search / replace function if available)

 

This is the flawed part.

 

I followed the instructions exactly. I opened the file…found the text in question…around line 84, and added the line. Then I ran a search/replace on the text suggested and replaced all the instances with the new text.

 

Here is the problem.

 

It replaced the $_POST['invoice'] in the line I ADDED TO THE FILE with the $invoice_id text. This should not happen. The text you add to the file should be left alone and ALL THE OTHER instances of $_POST[‘invoice’] should be replaced. If you just do a blind S/R on the file and that new line is changed (as I did) the update status process won’t work.

 

Once I went back into the ipn.php file and replaced line 84 with the correct text from the instructions…it all started working just fine.

 

Orders come in…marked with “preparing [Paypal IPN]”….customer completes the transaction…..Order status is changed and customer get’s their file.

 

Problem solved.

 

I apologize for the long post, but I think the history/process is important. I’d followed the instructions (to the letter I thought) but nothing was working.

 

Basically you just need to do the search replace FIRST, and then add the new line.

 

I hope this helps. I’ve seen lots of people reporting similar problems, and I suspect might have done the same thing I did.

 

I’d like to thank TerraNetworks for their help on this.

 

Good luck to you all.

 

Justin Knupp

Stonecreek Media.

Grand Canyon climate is greatly influenced by altitude, with lower elevations generally found to be warmer year round. The record high temperature was 99 °F (37 °C) in 2002, while the coldest temperature recorded is −66 °F (−54 °C) in 1933.[8] During the summer months of June through early September, daytime highs are normally in the 70 to 80 °F (21 to 27 °C) range, while nighttime lows can go to below freezing (0 °C)—especially at higher altitudes. Summer afternoons are frequently accompanied by thunderstorms. Spring and fall temperatures range between 30 and 60 °F (-1 and 16 °C) with cold nights in the teens to single digits (−5 to −20 °C). Winter in Grand Canyon is very cold with high temperatures usually between zero to 20 °F (−20 to −5 °C) and nighttime temperatures below zero °F (−20 °C) for most of the winter.[104]

 

Precipitation in Grand Canyon is highly variable and ranges from 15 inches (380 mm) annually near Mammoth Hot Springs, to 80 inches (2,000 mm) in the southwestern sections of the park. The precipitation of Grand Canyon is greatly influenced by the moisture channel formed by the Snake River Plain to the west that was, in turn, formed by Grand Canyon itself. Snow is possible in any month of the year, with averages of 150 inches (3,800 mm) annually around Grand Canyon Lake, to twice that amount at higher elevations.[104] http://www.grandcanyon-nationalpark.org/

 

Tornadoes in Grand Canyon are rare; however, on July 21, 1987, the most powerful tornado recorded in Wyoming touched down in the Teton Wilderness of Bridger-Teton National Forest and hit Grand Canyon National Park. Called the Teton–Grand Canyon tornado, it was classified as an F4, with wind speeds estimated at between 207 and 260 miles per hour (333 and 420 km/h). The tornado left a path of destruction 1 to 2 miles (1.6 to 3.2 km) wide, and 24 miles (39 km) long, and leveled 15,000 acres (6,100 ha; 23 sq mi) of mature pine forest.[105]

Link to comment
Share on other sites

As Terra mentioned in her reply, you have sessions problems in your store. What did you set in your includes/configure.php for HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN? Do you have a shared or dedicated SSL certificate?

 

 

Thanks for your help Alex.

 

here is what I have in configure.php

 

  define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com');
 define('HTTP_COOKIE_PATH', 'http://www.mydomain.com/shop');
 define('HTTPS_COOKIE_PATH', 'http://www.mydomain.com/shop');

 

 

i have not installed any SSL certificate yet.

 

regards

Jason

Link to comment
Share on other sites

Try this:

  define('HTTP_COOKIE_DOMAIN', '.mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', '.mydomain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');

Notice there are 2 dots in the cookie domain definition.

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

Try this:

  define('HTTP_COOKIE_DOMAIN', '.mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', '.mydomain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');

Notice there are 2 dots in the cookie domain definition.

 

Hi Alex . i tried . but it did not solve the problem. the customer still returned to the shop login.php with new OScid .

 

If I turned Paypal Auto Return for Website Payments to on and set the return URL as http://mydomain.com/checkout_process.php , it then works. no problem.

 

Would it be o.k. for just having the auto return activated ? will i miss something ? or will it just serve the same purpose as I could see the paypal IPN button was also linked to checkout_process.php. For an unknown reason, the button won't work for me. it return to the store login.php with new OSCid.

 

In the admin session control pannel, I only set prevent spider session to be ture. others are false.

 

Regards

jason

Link to comment
Share on other sites

It is really a session setting problem. If you don't fix it, unexpected things can happen. You need to check where sessions are logged (database or file), and the accessibility of the session records (if store sessions in file, check the tmp folder).

 

This is not related to PayPal IPN module. Please find your answer in forums/threads regarding sessions.

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 There

Since i did those email changes, the item email isn't going out anymore to the customer? :-(

 

Also the status isn't changing from Preparing (paypal IPN)

 

It was just going to "Processing" before, and alsot the quantitiy of stock isn't decreasing by one with my 0.01p text product showing the same quanity after a purchase

 

Is there something I have done thats stopping it working and auto processing

Link to comment
Share on other sites

MY settings in the system are:

 

PayPal IPN

 

Enable PayPal IPN Module

True

 

Gateway Server

Live

 

E-Mail Address

[email protected]

 

Sort order of display.

0

 

Transaction Currency

Only GBP

 

Payment Zone

--none--

 

Force shipping address?

False

 

Set Preparing Order Status

Processing

 

Set PayPal Acknowledged Order Status

Pending

 

Set PayPal Completed Order Status

Processing

 

Transaction Type

Per Item

 

Move tax to total amount

True

 

Page Style

 

 

Debug E-Mail Address

[email protected]

 

Enable Encrypted Web Payments

False

 

Your Private Key

 

 

Your Public Certificate

 

 

PayPals Public Certificate

 

 

Your PayPal Public Certificate ID

 

 

Working Directory

 

 

OpenSSL Location

/usr/bin/openssl

Link to comment
Share on other sites

Now, i am getting these error messages, when testing:

 

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

Have tried clearing cache, browser history etc but no luck

Any ideas?

Thanks

 

i 've got the same problem a while ago. following terra's advice ( a few pages before this) and change the order id number. it solve my problem. you may try if it works for you.

Link to comment
Share on other sites

Alex, I've try to post on the general support. hope someone may help.

 

In the meantime, I've done serveral test using the sandbox.

 

the customer is redirect to the store with new oscsid after complete the payment of the order at paypal.

 

However, just before redirect to the store, I could see the link which "complete the order confirmation" button should bring the customer to. And if I do not click the button and simply type the URL manually.

 

such as ( http://www.mydomain.com/shop/checkout_proc...9dd62670745541c )

 

It is o.k. it would then redirect to the success page.

 

However, if the customer click on the "complete the order confirmation" button, it redirect to login.php with new Oscsid whch is different from what the link should be.

 

I just can't figure it out. I have just typed the URL link (which I could see when I mouse on the order confirmation button ) and it works. but if i press the button, it move to login.php with a new oscsid . I'm wondering what have happened when one clicking on the button.

 

still wondering why....

 

jason

Link to comment
Share on other sites

I just can't figure it out. I have just typed the URL link (which I could see when I mouse on the order confirmation button ) and it works. but if i press the button, it move to login.php with a new oscsid . I'm wondering what have happened when one clicking on the button.

 

still wondering why....

 

jason

I suddenly bumped into this problem the other day myself. It was working fine for months and all of a sudden seems to have started doing this.

 

I notice that the PayPal payment screens have changed now. I am not sure when this happened and wonder if it is related.

 

I have also noticed that the problem occurs when I use Internet Explorer (7), but Opera is OK.

Link to comment
Share on other sites

I suddenly bumped into this problem the other day myself. It was working fine for months and all of a sudden seems to have started doing this.

 

I notice that the PayPal payment screens have changed now. I am not sure when this happened and wonder if it is related.

 

I have also noticed that the problem occurs when I use Internet Explorer (7), but Opera is OK.

 

 

I'm using IE7 too.

 

I'm just wondering why. To solve the problem temproary, I turn the auto return to on and enter " http://www.mysite.com/shop/checkout_process.php " as the return URL. it works, customer would then return to the store with his/her oscsid in that session. Surprisingly the oscsid has not been changed in this scenario. It was exactly the same oscsid before he/she entered paypal.

 

My question is: If it was a problem with session, it should not work either with the return URL activated. but no problem and everything goes smoothly with auto return URL activated. the OSCSID could be maintained, why? the session could be maintained when return URL is activated. But if the "complete order confirmation " button is used , a new session and new OSCSID was generated . )

 

 

I'm very confused now. I've tried to search about the session on the forum but did not have any clue yet.

 

jason

Link to comment
Share on other sites

HI There

OK, no luck

 

yes, it looked like a caching problem with paypal - so that one is sorted out

 

but

 

The emails still are not going out when a purchase is made.....

The stock quantity is not decreasing by one either

 

Is there something wrong with the ipn.php or checkoutprocess.php that would cause this?

or are my settings wrong in the admin side for the contribution? (as posted above).

 

Beginning to wish i had never altered the email....

 

Hope you can help!

 

Thanks

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