Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]Paypal IPN - Devosc


devosc

Recommended Posts

It doesn't fix my problem of the ipn.php file trying to download (Firefox) or coming up "Cannot Find Server" (Internet Explorer).

 

I think I'll have to try it again on a clean installation or something so I can find out if it's the server, or something in one of the files.

Link to comment
Share on other sites

  • Replies 2.1k
  • Created
  • Last Reply

Top Posters In This Topic

I've just tried it on a clean install, with the MS2-2.2OverWriteAndRun files from PayPal_Shopping_Cart_IPN_v3.1.5 uploaded over it.

 

There were a couple of folders instead of files so it didn't run at first, but when I fixed that it was ok. It seemed like it was working, because the ipn.php file showed up as a blank white page when I ran it in my browser (like I believe t is supposed to) but no debug emails were showing up.

 

I realised the /includes/modules/payment/paypal/classes/osC/Order.class.php and /includes/modules/payment/paypal/classes/osC/osC.class.php files in the package were folders and not php files, so I hat to get the proper ones from the /catalog/ section of the archive.

 

Once I uploaded these I am back with the same problem, the ipn.php file just won't load, it seems to be some sort of server incompatibility.

Link to comment
Share on other sites

  • 2 weeks later...

Hi there,

I've got the following problem and can anybody help me out?

 

everything looked good after i installed Paypal IPN, until I succeeded to check out orders by using paypal or paypal sandbox.

All items in shopping cart, supposed to be cleared after checkout succeeded, are still in the cart. While I check out an order again, the new order record always covered the previous order record and all items in shopping cart can't be cleared. The order number didn't increase. I tried to use another payment mothed and there's no such problem.

I guess the reason of the above problem is that the code followed in checkout_process.php page didn't run,

$cart->reset(true);

 

Does anyone have the same problem as I've got, or can anyone help me out here?

 

Thank you,

Stephano

Link to comment
Share on other sites

Does anyone know how to set it up so the paypal ipn redirects you to the "dont have an account" paypal page.

 

basically I want my customers to immediatly see the credit card option during checkout and not get discouraged by thinking they only have to pay with paypal.

 

Thanks,

Tom

Link to comment
Share on other sites

  • 3 weeks later...

Hi my contrib seems to have installed ok apart from:

 

The IPN test doesnt work? I get the following error:

 

Not Found

The requested URL /catalog/admin/FILENAME_PAYPAL was not found on this server.

 

And the debug e-mail doesnt save?

 

Any ideas?

 

Many thanks!

 

Shahid

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hi there,

 

my problem is a little bit tricky, because I didn't change anything before:

 

In the checkout_payment.php are the pics of Visa, Mastercard etc. are disappeared. Also the Paypal-Pic in the orders.php in Admin.

 

I don't have any idea what happened. Had anybody the same problems or have anyone an idea?

 

Thanks a lot!

Mathias

Link to comment
Share on other sites

I can't login or load the paypal website, so I am guessing, they have some problems.

 

 

This is definitely not the reason because the pics on my own server. This code must be a a part of the problem:

 

	function selection() {
  $img_visa = DIR_WS_MODULES .'payment/paypal/images/visa.gif';
  $img_mc = DIR_WS_MODULES .'payment/paypal/images/mastercard.gif';
  $img_discover = DIR_WS_MODULES .'payment/paypal/images/discover.gif';
  $img_amex = DIR_WS_MODULES .'payment/paypal/images/amex.gif';
  $img_paypal = DIR_WS_MODULES .'payment/paypal/images/paypal_intl.gif';
  $jscript_url = '<a style="cursor: pointer; cursor: hand;"' . " onclick=\"java script:popup=window.open(\'" . $this->cc_explain_url . "\',\'popup\',\'scrollbars,resizable,width=625,height=600,left=50,top=50\'); popup.focus(); return false;\">";
  $cc_explain = '<div style="A.hover{cursor:hand}">' . MODULE_PAYMENT_PAYPAL_CC_DESCRIPTION .' ' .
				"<script>document.writeln('" . $jscript_url .
				MODULE_PAYMENT_PAYPAL_CC_URL_TEXT . "</a>');</script>" .
				'<noscript><a href="' . $this->cc_explain_url . '" target="_blank">' .
				MODULE_PAYMENT_PAYPAL_CC_URL_TEXT . '</noscript>' ."\n".'</div>';
  $paypal_cc_txt = sprintf(MODULE_PAYMENT_PAYPAL_CC_TEXT,
						  tep_image($img_visa,' Visa ','','','align="absmiddle"'),
						  tep_image($img_mc,' MasterCard ','','','align="absmiddle"'),
						  tep_image($img_discover,' Discover ','','','align="absmiddle"'),
						  tep_image($img_amex,' American Express ','','','align="absmiddle"'),
						  tep_image($img_paypal,' PayPal ','','','align="absmiddle"')
						 );
  $fields[] = array('title' => '', //MODULE_PAYMENT_PAYPAL_TEXT_TITLE,
					'field' => '<div><b>' . $paypal_cc_txt . '</b></div>' . $cc_explain );
  return array('id' => $this->code,
			   'module' => $this->title,
			   'fields' => $fields);
}

Link to comment
Share on other sites

If you have not changed anything, and the pics are on your site (confirmed), ask your web host what has changed.

 

I don't know the reason but it was an Database-Prob... After an backup it works again. But the main problem still exists, although I checked all settings and all commentaries in this topic concerning my problem:

 

No PayPal Transaction Information Available (f786b....)

 

Has anybody an idea what's the problem, maybe you Coopco? Are PayPal have to access my sql-database? Maybe my Provider doesn't allow this.

 

It's really disappointing, This problem is keeping myself really busy since 4 days, with no result... :(

 

Thanks for your help!

Link to comment
Share on other sites

I don't know the reason but it was an Database-Prob... After an backup it works again. But the main problem still exists, although I checked all settings and all commentaries in this topic concerning my problem:

 

No PayPal Transaction Information Available (f786b....)

 

Has anybody an idea what's the problem, maybe you Coopco? Are PayPal have to access my sql-database? Maybe my Provider doesn't allow this.

 

It's really disappointing, This problem is keeping myself really busy since 4 days, with no result... :(

 

Thanks for your help!

 

I do not understand "After an backup it works again. But the main problem still exists, " I assume that you restored your database, but that does not explain to me what is happening.

 

Paypal can not access your database.

 

No PayPal Transaction Information Available usually means that the order did not complete (it may be that the info was lost when you restored your database).

The main thing is that if you did not change anything at all, the problem must be elsewhere.

 

If you have no joy, send devosc a PM.

Link to comment
Share on other sites

There's no doubt that Dev OSC created a very clever and wide-ranging contribution for Pay Pal and that it answered many of the problems encountered with other Pay Pal IPN contributions.

 

However, it does involve editing a lot of code in other files (at least it did the last time I installed it) and is quite a major installation.

 

Since 'Terra' took over managing the 'official' osCommerce Pay Pal IPN (which was supposedly going to be updated by the osCommerce Team) it has advanced in leaps and bounds.

 

The problems of lost orders has been solved - now customers don't need to return from Pay Pal for orders to get updated, emails sent out etc. and it remains a stand-alone installation (no need to edit any other files).

 

I'm not knocking this contrib - but I do think that people will find the newly updated osCommerce Pay Pal IPN a much easier mod to install.

 

Vger

Link to comment
Share on other sites

Hi Vger

 

I have found that once this contrib is installed correctly, it works, and goes on working. I have it isntalled in my store and my test store. I have never had problems with lost orders.

 

There are some probs when installing it with some other contribs that are equally complex (eg CCGV).

 

I have never installed any other PayPal contribs, so I cannot comment on this.

 

Mathias has maintained that he has not changed ANYTHING, so we are working on that premise.

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

my site is English connected to a Japan-based PayPal account. Today I received an email from PayPal (quoted below) announcing that they will open a new Japanese PayPal site, which means that the PayPal checkout process will automatically revert to Japanese language.

 

How can I force the module to stay in English language?

 

Thanks and regards

 

Dirk

 

 

PayPal is launching a Japanese version of its site in March 2007.

At that time, the checkout flow for all Japan-based sellers will

automatically convert to Japanese language pages if the Buyer's

Country (or "LC") setting on your website is set as "Japan" or

not set at all. This change will not affect eBay checkout.

 

If you sell primarily to non-Japanese speakers and wish to

maintain your checkout pages in another language, you must follow

some simple steps to set your language default appropriately.

 

If you use the PayPal Shopping Cart, Buy Now Buttons,

Subscriptions and Recurring Payments, or Donations, here’s how to

change your Buyer's Country (or "LC") setting:

 

Log in to your account.

 

Select the Merchant Services tab.

 

Choose your solution from the Key Features list in the box on the

right.

 

Once you reach the settings page, find the Buyer’s Country

section.

 

Select the appropriate country.

 

Note: If you are selling to a primarily English-speaking country,

set the Buyer’s Country to United States so that your checkout

flow will be in English.

 

 

Follow the remaining instructions on the page and paste your new

HTML code onto your website.

 

If you use a third-party shopping cart provider, you will need to

contact that provider about changing your LC settings.

 

Please make your changes prior to March 8 to ensure that checkout

stays simple for your customers.

 

Sincerely,

 

PayPal

Link to comment
Share on other sites

Hello,

 

my site is English connected to a Japan-based PayPal account. Today I received an email from PayPal (quoted below) announcing that they will open a new Japanese PayPal site, which means that the PayPal checkout process will automatically revert to Japanese language.

 

How can I force the module to stay in English language?

 

Thanks and regards

 

Dirk

PayPal is launching a Japanese version of its site in March 2007.

At that time, the checkout flow for all Japan-based sellers will

automatically convert to Japanese language pages if the Buyer's

Country (or "LC") setting on your website is set as "Japan" or

not set at all. This change will not affect eBay checkout.

 

If you sell primarily to non-Japanese speakers and wish to

maintain your checkout pages in another language, you must follow

some simple steps to set your language default appropriately.

 

If you use the PayPal Shopping Cart, Buy Now Buttons,

Subscriptions and Recurring Payments, or Donations, here’s how to

change your Buyer's Country (or "LC") setting:

 

Log in to your account.

 

Select the Merchant Services tab.

 

Choose your solution from the Key Features list in the box on the

right.

 

Once you reach the settings page, find the Buyer’s Country

section.

 

Select the appropriate country.

 

Note: If you are selling to a primarily English-speaking country,

set the Buyer’s Country to United States so that your checkout

flow will be in English.

Follow the remaining instructions on the page and paste your new

HTML code onto your website.

 

If you use a third-party shopping cart provider, you will need to

contact that provider about changing your LC settings.

 

Please make your changes prior to March 8 to ensure that checkout

stays simple for your customers.

 

Sincerely,

 

PayPal

It is only a guess, but

Note: If you are selling to a primarily English-speaking country,

set the Buyer’s Country to United States so that your checkout

flow will be in English.

Link to comment
Share on other sites

Thanks but those instructions are for PayPal Shopping Cart, Buy Now Buttons,

Subscriptions and Recurring Payments, or Donations, not for 3rd party shopping carts like OSC.

Edited by Dirk-san
Link to comment
Share on other sites

Thanks but those instructions are for PayPal Shopping Cart, Buy Now Buttons,

Subscriptions and Recurring Payments, or Donations, not for 3rd party shopping carts like OSC.

 

Oops, my badi.

 

Not sure. My site is English only (in Australia).

 

My OSC default language is English.

 

In my PayPal profile at PayPal, under selling preferences, there is a Language Encoding option that I have set to English only.

 

If I was located in Japan, I would expect that my payment language would not change to Japanese.

 

Sorry, I do not know of any other setting.

 

Konbanwa Dirk-san

Link to comment
Share on other sites

Hello, (Yes I searched)

 

I have installed the PAYPAL_Shopping_Cart_IPN and it works great, But when I get the emails they are all jumbled up together. No matter if I have Plain Text Turned on or HTML in osCommerce.

 

It seems most emails I get are fine, but the ones from IPN (anything to do with orders) are all jumbled up and you simple can't make. It looks like the formatting is ignored when the email is sent.

 

 

Example:

Hello--------this---------What---amount------are----

----------you-----doing-------this---is-----fun-----

$123.00------Dollar----Paypal------

 

 

This is from the Debug file (one of the emails that looks terrible)

 

  
function info($html = false) {

   $debug_string = '';

   $lf = "\r\n";

   $debug = $this->info;

   reset($debug);

   $nMsgs = count($debug);

   for ($i=0; $i<$nMsgs; $i++) {

     $debug_string .= EMAIL_SEPARATOR.$lf.$debug[$i]['subject'].$lf.EMAIL_SEPARATOR.$lf.$debug[$i]['msg'].$lf.$lf;

   }

   return ($html === true) ? str_replace("\n", "\n<br />", $debug_string) : $debug_string;

 }


function sendEmail() {

   if(count($this->info) > 0) {

     $to_name = '';

     $to_address = $this->email_address;

     $subject = IPN_PAYMENT_MODULE_NAME;

     $this->add(IPN_EMAIL,IPN_EMAIL_MSG);

     $msg = strip_tags(nl2br($this->info()));

     $from_name = IPN_PAYMENT_MODULE_NAME;

     $from_address = strtolower(trim($this->email_address));

     tep_mail($to_name, $to_address, $subject, $msg, $from_name, $from_address);

   }

 }

}//end class

 

 

 

 

Thanks!!! If there is a quick fix already posted that I missed please link me to it :D

Edited by LiquidGfx

I think it works now!!!!..oh! no it don't !

Link to comment
Share on other sites

I have thought about this more and hope that the PayPal language is based on the customer's country, not mine. Let's see what will happen on 8 Mar.

What happened?

Link to comment
Share on other sites

  • 4 weeks later...

Hi, this contribution worked great with my previous host. I now changed hosting companies and I can't get the contribution to work.

 

When I transfered everything over, removed the contribution and then reinstalled it from the admin, so that the new settings would take affect. I set my settings up correctly.

 

My first problem was that when I ran a IPN test I would get Invalid test, so I searched around and someone reccomended in IPN.class.php I change the following:

 

$var = urldecode($var); $val = stripslashes(urldecode($val));

 

to:

 

$val = ini_get('magic_quotes_gpc') ? stripslashes($val) : $val;

 

I did that and tested the IPN and it says test passed. So that works.

 

However, when I get a PayPal order the order status will not update, and when I click order details it says something like:

 

No PayPal Transaction Information Available (hjsdhjsdfhijksfd9889h3908yh8)

 

What could be the problem? I checked order_session_info table and the proper txn_signature and stuff is being recorded.

 

Any ideas? Also, should my E-Mail Address and Business ID be the same email and primary email? (they are the same but not my primary PayPal email)?

Link to comment
Share on other sites

Hi, this contribution worked great with my previous host. I now changed hosting companies and I can't get the contribution to work.

 

When I transfered everything over, removed the contribution and then reinstalled it from the admin, so that the new settings would take affect. I set my settings up correctly.

 

My first problem was that when I ran a IPN test I would get Invalid test, so I searched around and someone reccomended in IPN.class.php I change the following:

 

$var = urldecode($var); $val = stripslashes(urldecode($val));

 

to:

 

$val = ini_get('magic_quotes_gpc') ? stripslashes($val) : $val;

 

I did that and tested the IPN and it says test passed. So that works.

 

However, when I get a PayPal order the order status will not update, and when I click order details it says something like:

 

No PayPal Transaction Information Available (hjsdhjsdfhijksfd9889h3908yh8)

 

What could be the problem? I checked order_session_info table and the proper txn_signature and stuff is being recorded.

 

Any ideas? Also, should my E-Mail Address and Business ID be the same email and primary email? (they are the same but not my primary PayPal email)?

Your sandbox setting and paypal settings should be identical.

Check that you have turned off both testing items in Admin.

Your primary PayPal email should be used for email and business id. If it is not suitable, change the primary at paypal.

Link to comment
Share on other sites

Your sandbox setting and paypal settings should be identical.

Check that you have turned off both testing items in Admin.

Your primary PayPal email should be used for email and business id. If it is not suitable, change the primary at paypal.

 

 

I changed the primary email in my PayPal account to match the one in the settings, and it seems to be working fine now. Is there a fix for this small problem though? If I have another site, I don't want to use the same primary PayPal email for all my sites, seems like a small problem, but at least it's now working.

 

If I run into any more problems I will post here.

 

Thank you!

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