Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Sorry, it mind sound stupid, but I don't find this file:

 

catalog/ext/modules/payment/paypal_ipn/ipn.php.

 

I just uploaded the two other files. In the package that I downloaded there was no file like ext/modules/payment/paypal_ipn/ipn.php.

 

What have I done wrong?

Link to comment
Share on other sites

You may be in the wrong forum thread then.

 

This support thread is for the osCommerce PayPal IPN Module v1.0 For 2.2MS2

 

Which can be downloaded from http://www.oscommerce.com/community/contributions,2679

 

osCommerce PayPal IPN Module has the 3 files I listed above.

 

Or perhaps you didn't upload everything? and this could be the source of your problems? Re-examine the original package you downloaded.

Edited by ATVUtah
Link to comment
Share on other sites

Sorry guys, I have had a hunt through and can't see where anyone else has got stuck at this point- THE BEGINNING! I have downloaded and copied all of the files for the osCommerce-PayPal_IPN-v1.1 JAN 2005 but when I log into my oscommerce admin and clickk install on paypal (creditcard/ debit) - NOTHING HAPPENS. I just get return to the same page with INSTALL button no other prompts. I have reinstalled a couple of times the files - is there something else I need to activate to get this install to work?

Cheers for all you help

Link to comment
Share on other sites

Dear All

 

Could I please just verify what this contribution actually does?

 

What I am after for OSC is for the user to not require a Pay Pal account when buying my goods. They just confirm their OSC order, then enter card details via Pay Pal. The add-on takes care of the rest. Is that what this contribution does?

 

Many Thanks

Eddie Howell

Link to comment
Share on other sites

Dear All

 

Could I please just verify what this contribution actually does?

 

What I am after for OSC is for the user to not require a Pay Pal account when buying my goods. They just confirm their OSC order, then enter card details via Pay Pal. The add-on takes care of the rest. Is that what this contribution does?

 

Many Thanks

Eddie Howell

 

Yes. At PayPal now they are not required to have an account but are instead offered to create one after they finish your transaction.

Link to comment
Share on other sites

Yes. At PayPal now they are not required to have an account but are instead offered to create one after they finish your transaction.

 

 

Thanks for your response. How does the system work though, from the user's perspective. At which point do they have to enter their card details, and does it remein on the OSC site itself?

 

Ta

Link to comment
Share on other sites

Thanks for your response. How does the system work though, from the user's perspective. At which point do they have to enter their card details, and does it remein on the OSC site itself?

 

Ta

 

The user progresses through a couple OCS screens then hits a confirm order button and is transferred to the PayPal website for the credit card processing function. Upon completion there they return to your site and a thank you page.

 

2 things.

 

#1 You should customize the look of the paypal pages through your paypal account preferences and add your logo to the pages.

 

#2 if you intend to use PayPals shipping label system you will need to modify the OSC PayPal IPN module to pass a parameter they forces the customer to enter a shipping address at the PayPal pages. By default it doesn't ask for a shipping address at paypal and it does not pass the address from OSC to PayPal. The instructions on how to make this modification are in this thread a few pages back. A couple customers complained they had to enter their address again but I simply used the excuse it was for their credit card security and to prevent fraud to which they always reply "oh good, I like that your double checking things"

Edited by ATVUtah
Link to comment
Share on other sites

I am having a problem with PayPal IPN (the oscom team version 1.x) and attributes. When an order goes through with attributes, these are not shown in the order confirmation email.

 

Orders which do not use the PayPal IPN work fine, but for orders which use paypal_ipn.php, the attributes are missing. Also, the admin part is fine - attributes are shown in admin, invoices & packing slips, so it's only the confirmation email which doesn't work.

 

I have narrowed the problem down to the select statement and the languages_id ... if the language_id clause is removed, the attributes show... but that's where I've hit a brick wall and am getting a headache :angry:

 

I'm focussing on this bit of code:

 

/------insert customer choosen option to order--------
	$attributes_exist = '0';
	$products_ordered_attributes = '';
	if (isset($order->products[$i]['attributes'])) {
	  $attributes_exist = '1';
	  for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
		if (DOWNLOAD_ENABLED == 'true') {
		  $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename
							   from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
							   left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
							   on pa.products_attributes_id=pad.products_attributes_id
							   where pa.products_id = '" . $order->products[$i]['id'] . "'
							   and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'
							   and pa.options_id = popt.products_options_id
							   and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'
							   and pa.options_values_id = poval.products_options_values_id
							   and popt.language_id = '" . $languages_id . "'
							   and poval.language_id = '" . $languages_id . "'";
		  $attributes = tep_db_query($attributes_query);
		} else {$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");
		}
		$attributes_values = tep_db_fetch_array($attributes);

		$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
	  }
	}
//------insert customer choosen option eof ----

 

And the bit which seems to make it fall over is this:

and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");

 

If anybody recognises this problem & can give me a nudge into the right direction, would be brilliant!!

 

Edith

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

Okay, I'm off now to get Paracetamol for my headache but before I do that - I think I found the fix. And of course, it's something tiny & simple. After trying to rewrite the whole bl*** thing for hours, turns out, I only had to insert ONE variable ... (noise of head against brick wall ...) and ONE comma ...

 

Around line 420 in /includes/modules/payment/paypal_ipn.php find this code:

 

	function before_process() {
  global $customer_id, $order, $sendto, $billto, $payment, $currencies, $cart, $cart_PayPal_IPN_ID;
  global $$payment;

 

and replace with this code:

 

	function before_process() {
  global $customer_id, $order, $sendto, $billto, $payment, $languages_id, $currencies, $cart, $cart_PayPal_IPN_ID;
  global $$payment;

 

All I've done is insert $languages_id ... and it's working so far! Tested online with PayPal Sandbox with two different languages. I'm also using QTPro and I think that should work now as well, but haven't tested yet - that's one for tomorrow.

 

************************

For future generations - this post contains a suggested fix for official PayPal IPN module problem with missing attributes in order confirmation email. Should also work for shops using QTPro Quantity Tracking Professional for stock attributes.

**********************

 

Good night, Terra :thumbsup:

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

Hiya my friends... i'v a problem with this contribution payment module:

 

I'v installed Oscommerce 2.2 and i'v read all post i'v seen in order to get running:

PayPal IPN Payment Module + Download Controller 5.3

 

I'v been guided by: Installation Guide - osC Paypal IPN 1.1 + Downloads Controller 5.3 - on fresh osC MS2.2, for 'lazy' users to sell downloadable goods (Oct 27 2005, 10:37 PM). It's the best post i'v read about this till today, but i'v a little problem.

 

I havent installed yet the Download Controller 5.3 contribution. First i want to try the Palpay IPN 1.2 for 2.2MS2....

 

Ever i do a paypal IPN payment trhought sandbox of course, and after i get authenticated, i get from the sandbox:

 

"This invoice has already been paid" and i havent paid nothing instead on Sandbox. I do another order, and another and another, with different user, but nothing... ever the same: "This invoice has already been paid"

 

One of the paypal staff guys tell me that the payment button has the same IPN each time ???? i dont undestant, what can i do?

 

Thanks in advance!

Link to comment
Share on other sites

Hi xvilar,

 

as you did some test with the sandbox, ipn's are registered in the order_session_info table.

You most likely did delete the orders from your testing, but didn't delete them in the order_session_info.

 

So the solution is simple, delete all lines from the order_session_info table where there are order_id's that don't exist in your orders table.

 

Had the same problem a few days ago.. took me a while to figure this one out....

 

Cheers,

 

Frank

Link to comment
Share on other sites

Another problem with PayPal Sandbox is if you install the test site in a folder on a domain with another osCom shop - PayPal doesn't know the difference and therefore thinks the invoice has alreay been paid. If you have a working shop which uses PayPal IPN, would be worth installing a test shop on a different domain or sub-domain. 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

There is another reason for the "Invoice already paid" message and I forget the exact cause. It is however discussed multiple times in this PayPal IPN Thread way back towards the beginning.

 

My memory tells me it had something to do with properly configuring everything for the sandbox. Which means being logged into the Sandbox in another window and minimizing it, setting up 2 phony accounts in the sandbox, one seller, one buyer, and then something about creating a fake credit card, setting up two phony email accounts and so on and so forth. Also the IPN module set to the paypal test server and using the phony seller information.

 

Begin with post one and read from the beginning http://www.oscommerce.com/forums/index.php?showtopic=179917 It's there you just have to do some hunting to find it.

 

 

It's all so dam complicated I finally setup myself a personal PayPal account (PayPal allows this), sent it some money from my business account (which is free to do), configured the IPN module to be live and tested via a live account. Then refunded the money back to the personal account to do more testing. All fee's get deleted and I know it works when done testing and nothing to reconfigure to switch to a live store because it already is. :-) I then spent the money from the personal account on a cool toy to celebrate!

Link to comment
Share on other sites

This is probably a daft question but where do I get a digest key from? or do I just make one up? If the later is true do I need to enter it in my Paypal profile somewhere?

Link to comment
Share on other sites

Hi,

 

Does this module send the iso country code or language to paypal?

Do customers from the uk get the english paypal page and people from germany the german page?

 

Best..

Stephan

 

I changed the file /catalog/includes/modules/payment/paypal_ipn.php

 

Right after line 268

	  $parameters = array();

 

add

 

	  $parameters['lc'] = $order->billing['country']['iso_code_2'];

 

This way your customers get the right language when they come to the paypal page.

Tested with germany, united kingdom and france as the customers address.

 

Best..

Stephan

 

 

Link to comment
Share on other sites

Hiya myfriends, first of all thnx for yours answers. I'v solved the 'already payment done' mistake. I think it was the IPN url i'd put in PayPal seller configuration.

 

I'm only using osCommerce MS2.2 (latest) with Paypal IPN 1.3 (latest). Still not installed download controller. I try to buy a product with shipment or another trought download. I can pay and finish in Paypal Sandbox all the proccess (in both cases, with shipment or download), including to see the Paypal receipt, etc. and i get a new order status in my osCommerce installation. (i know i would like to use download i'v to use Download Controller or any contribution similar).

 

But i recive this status: "PayPal IPN Invalid [Completed]"

 

I receive too an email with same text as subject and the next mess body:

 

" $_POST:

 

payment_date=06:04:08 May 23, 2006 PDT

txn_type=web_accept

last_name=my last name

residence_country=ES

item_name=My Eshop - TEST

payment_gross=

mc_currency=EUR

[email protected]

payment_type=instant

verify_sign=AnNMT7nRteKS2auTkxdsRz9rRvvPAHagtjI0pTvYqBAVxF-pLlDdblKi

payer_status=verified

test_ipn=1

tax=0.00

[email protected]

txn_id=29W71889WF071490N

quantity=1

[email protected]

first_name=Comprador

invoice=23

payer_id=MNCVUMTEAXR8Q

receiver_id=4J93YG8Z5EQPU

item_number=

payment_status=Completed

payment_fee=

mc_fee=0.96

shipping=6.00

mc_gross=18.00

custom=2

charset=windows-1252

notify_version=2.1

 

$_GET:

"

 

Could anyone here help me?

Thanks in advance.

Link to comment
Share on other sites

A little help please :)

 

I installed the contro this way...

 

Placed the three files I found, in the directory tree, into their same directories on the site. I changed nothing in the files.

 

In Admin I see the added Pay pal option and I am able to configure it...

 

However when I try to check out a test order the option is not showing up as on of the options available to use under payment... Tried moving the order around and reinstallling the option with no luck.

 

Can anyone see what I am missing?

 

Thanks

Steve

Link to comment
Share on other sites

Our customer who desired this seems under the impression that the user can complete a transaction, paying with Paypal, but never leaves the OSC part of the site (controlling the look/feel is of paramount importance). However, from what I am reading here it seems that it is mandatory for the user to be sent to the Paypal site to complete the transaction. I realize that once there, the site can be partly skinned using a custom Paypal page, but the skinning options are limited.

 

Can someone confirm or clairfy my understanding so I can advise my customer accordingly? Any help is most appreciated.

Link to comment
Share on other sites

Our customer who desired this seems under the impression that the user can complete a transaction, paying with Paypal, but never leaves the OSC part of the site (controlling the look/feel is of paramount importance). However, from what I am reading here it seems that it is mandatory for the user to be sent to the Paypal site to complete the transaction. I realize that once there, the site can be partly skinned using a custom Paypal page, but the skinning options are limited.

 

Can someone confirm or clairfy my understanding so I can advise my customer accordingly? Any help is most appreciated.

 

Indeed, the PayPal IPN leaves the OSC site and will go to the PayPal site, the customisation of those PayPal pages is very limited, in fact you can only add a banner....

 

Another solution is the PayPal Pro API, with this the customer doesn't leave OSC, the payment is done invisible to the customer. The PayPal Pro API implementation is a little harder to implement and beyond the scope of this forum.

 

Cheers.

Link to comment
Share on other sites

I uploaded and installed today the osCommerce PayPal IPN Module v1.0 For 2.2MS2, dated 21 May 2006, contribution. I managed to install it with OpenSSL option and Encryption on. It seems to work perfectly except that I cannot see any of the product items in PayPal. I was under the impression that this contribution display a list of all the purchased items in PayPal.

 

Is that correct? I have even seen screenshots of these on this thread. :o

 

One other thing: Looking for the contribution now on the OSC site, it just disappeared from the list. Maybe someone is updating the site. :'(

 

If anyone needs help in configuring this contribution for using OpenSSL and Encryption, I will be pleased to help!

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