Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal IPN Contribution Vs Built in Paypal


francisbay

Recommended Posts

I haven't turned on the Paypal that comes with the installation and I have not yet install the contribution Paypal IPN.

 

I just want to understand it first what is the difference between the Paypal that comes with the installation and the paypal IPN Contribution?

 

How each one works? :blink:

_____________________________________________________________________________

I manage to combine (products tab, review, xsell, prod attrib with a little change on the code i made to sweet enough the multi images i created) into products_info.php

 

xsell_v2.3 --> 80% working only. The cache folder does not update and no one can answer it.

CCGV

Certapay

Fancier_Invoice_&_Packingslip_v6.1

Header Tags

LoginboxV5.4_in_header

osCommerce-PayPal_IPN-v1.1

Products_Sold_v1.2

Registry

Registry Manager

Site Map MS2 - 2.3

Link to comment
Share on other sites

I haven't turned on the Paypal that comes with the installation and I have not yet install the contribution Paypal IPN.

 

I just want to understand it first what is the difference between the Paypal that comes with the installation and the paypal IPN Contribution?

 

How each one works? :blink:

 

Well I suggest that you go with IPN module and not the default one that comes with OSC.

The reason being that IPN ( Immediate payment notification ) is a way by which paypal communicates with our site pages at backend so you get a confirm communication from paypal when payment is received.

So missing on any due to net problem will not be there.

 

In the other module if a customer do not press return to site then the order table in DB is not populated.

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Well I suggest that you go with IPN module and not the default one that comes with OSC.

The reason being that IPN ( Immediate payment notification ) is a way by which paypal communicates with our site pages at backend so you get a confirm communication from paypal when payment is received.

So missing on any due to net problem will not be there.

 

In the other module if a customer do not press return to site then the order table in DB is not populated.

Satish

 

Not entirely true as the main difference is that the IPN module writes the order into the database before going to Paypal while the stock osC Paypal module only write the order to the database upon return from Paypal.

If a customer doesn't return from Paypal you don't have any order information with the stock Paypal module but you will have the information when using the IPN.

Using the IPN is preferable for this only but keep in mind that if a customer does not pay on Paypal afterall you will have an order written to your database which is invalid.

Link to comment
Share on other sites

Not entirely true as the main difference is that the IPN module writes the order into the database before going to Paypal while the stock osC Paypal module only write the order to the database upon return from Paypal.

If a customer doesn't return from Paypal you don't have any order information with the stock Paypal module but you will have the information when using the IPN.

Using the IPN is preferable for this only but keep in mind that if a customer does not pay on Paypal afterall you will have an order written to your database which is invalid.

 

I agree that the dat abse is populated before the client is moved to the paypal site.But when paypal receives payment it connects to a page on our site thru backend where by depending on the payment status the ipn page does updates the order status.

 

So i suggest that it is a solutin that is 100 times better then the default one that comes.

Well you can just see how important the solution is that the oSC team decided to develop this module and make it available.

 

Regards,

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

While this discussion is on-going, can someone explain clearly and precisely how the OSC IPN module and Paypal's Auto-Return operate (the data flow is what I need to understand) ?

 

How precisely is the IPN notification received? Is it the HTTP RESPONSE to an HTTP REQUEST made by the OSC IPN module or an asynchronous HTTP POST initiated from Paypal to the OSC IPN module?

 

In the Paypal account's IPN settings it requires an IPN URL belonging to the shop, but I don't see any documentation of what that should be set to in the IPN module. What should it be set to?

 

How does Paypal Auto-Return relate to this? I've seen various posts saying this should be enabled and set to the OSC checkout_success.php page (presumably we have to manually edit that to contain the Paypal-mandated text?).

 

If the Payal account Payment Data Transfer is enabled, there is an Identity token to go with it. I don't see anywhere in the OSC instructions on where that should be set.

 

I've configured the OSC IPN module with openSSL and set up the key and certificates, and I'm a PHP open-source hacker so I'm not short on technical ability, but everything I've read so far seems just so disjointed and incomplete.

 

------

TJ.

Link to comment
Share on other sites

I found this post by mightymidget which says, in passing, that when using the IPN module from the OSC team, we do not need to configure the Paypal account IPN or Auto-Return options because those details are passed to Paypal when the IPN module sends the customer there for payment.

 

As a side note, once the IPN is installed you do not need to enable IPN at paypal, or switch auto return on, these will make no difference what so ever. All of this fuctionality is built into the modules code and is sent with the payment request.

Is this correct? If so it would explain why I've been getting so confused. It certainly seems the way to do it from a technical point of view, but I'd like it confirmed by people who know whats what.

 

If it is, please get this information added to the IPN contribution install.html in BIG LETTERS so it doesn't take several hours of cotton-wool-brain searching of forums to ferret out :blink:

 

------

TJ.

Link to comment
Share on other sites

Using the Paypal sandbox I've satisfied myself that the Paypal account IPN and Auto-Return options don't need to be set when using the OSC IPN module - phew!

 

I have however come across an issue, to do with the placing of the Paypal-mandated text on the auto-return page.

 

With IPN this is the page checkout_success.php. I added the text to the includes/languages/english/checkout_success.php page, in the TEXT_SUCCESS variable.

 

It occurred to me that this isn't a good idea, because this page will be seen by customers using other modules to make their payments - having to mention Paypal in that situation would be extremely confusing!

 

Is there another way to deal with this?

Link to comment
Share on other sites

Using the Paypal sandbox I've satisfied myself that the Paypal account IPN and Auto-Return options don't need to be set when using the OSC IPN module - phew!

 

I have however come across an issue, to do with the placing of the Paypal-mandated text on the auto-return page.

 

With IPN this is the page checkout_success.php. I added the text to the includes/languages/english/checkout_success.php page, in the TEXT_SUCCESS variable.

 

It occurred to me that this isn't a good idea, because this page will be seen by customers using other modules to make their payments - having to mention Paypal in that situation would be extremely confusing!

 

Is there another way to deal with this?

 

I haven't checked/tried this yet but the idea is to add a define TEXT_SUCCES_PAYPAL variable to the language file(s) and within the checkout_success.php have a check for payment method upon which you can decide to show which TEXT_SUCCESS define. It depends if the payment method session is still available but otherwise you could specifically set a session variable for Paypal through the IPN and use that upon return.

Link to comment
Share on other sites

I added the variable/code you suggested and in testing it discovered what seems to me to be a serious issue with the IPN module.

 

First, how to add the detection logic.

 

In catalog/checkout_success.php add the payment_method field to the query on or around line 41:

$orders_query = tep_db_query("select orders_id, payment_method from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");

and add conditional logic to the echo statement that prints the success message, on or around line 80:

<?php echo ($orders['payment_method']=="PayPal (Credit Card / Debit)" ? TEXT_SUCCESS_PAYPAL : TEXT_SUCCESS); ?>

Then finally add the definition to the language files. For English this is catalog/includes/languages/checkout_success.php:

define('TEXT_SUCCESS', 'Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days.');
define('TEXT_SUCCESS_PAYPAL', 'Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account at <a href="http://www.paypal.com" target="external">www.paypal.com</a> to view details of this transaction.');

 

Now to the IPN problem. I currently have one product in my test shop, which has three product options, and therefore three price options.

 

After completing the first purchase IPN returned me to the checkout_success.php page from where I continued shopping. I selected the product again and chose a different product option and added it to the cart.

 

I was surprised to see the cart still contained the product I'd just successfully purchased, but I left it as it was and continued.

 

When I reached Paypal and signed in, after clicking the Pay Now button, I got an error report

Error Detected

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

The Order shows in OSC with status Preparing [PayPal IPN].

 

I then tried emptying the cart in my shop and starting again, and got the same error.

 

I signed out of the shop (to cancel the session) then signed back in again. The cart still contained the single item so I went through the checkout process again, and got the same error.

 

I emptied the cart, signed out of the shop, signed back in and tried again, and this time it succeeded.

 

Firstly, why is the item remaining in the cart? Is this something to do with the IPN pre-insert order into database logic?

 

Secondly, I can't understand why Paypal thinks the order is the same one. Surely the orders_id is passed as an identifier to Paypal? I'm choosing different options to give different order values. In the IPN module I have configured Transaction Type as Per Item.

 

I also noticed that PayPal shows the item being paid for as the name of the shop, not the item(s) choosen. I seem to recall reading about that as an issue here on the forums but can't find the article now I want it. Can anyone recall where the information on fixing this problem is?

Link to comment
Share on other sites

Using the Paypal sandbox I've satisfied myself that the Paypal account IPN and Auto-Return options don't need to be set when using the OSC IPN module - phew!

 

A slight correction to this. If the PayPal account Auto-Return option is disabled then the customer sees a Return to Merchant button. The option has to be enabled in the PayPal account for the customer to be returned to the shop automatically.

 

I had mistakenly thought that the OSC IPN module set the Auto_return option itself.

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