Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

If you moved all those jobs to ipn.php, then when customers returned to your store but the IPN were delayed or never been received or something wrong with the payment (Invalid results), the order records were not updated, no emails would be sent out, .....etc. Nothing could be done where they should be.

 

The stock quantity should be updated only after orders have been completed, just like all other payment modules do. Customers must return to store to complete their order.

 

Rather than thinking about how to make it work if customers don't return, you should better think about how to make sure your customers know that they must return.

I see your logic of the IPN update scenario... you have a point.

 

Well customers can get a pop-up message ensuring a return to the store is a must, that's easy.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

The only problem with that is the monthly cost - small businesses don't want to pay the monthly charge of US$20 or UK£20 (UK£20 is around US$39 at the moment!)

 

I see the benefits of express checkout but the costs defeat the object for many businesses - i can't recommend it to customers

I didn't see any monthly fee for the 'Additional Payment Option', which offers 'Express Checkout' as the recommended method for merchants familiar with API programming.

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

I didn't see any monthly fee for the 'Additional Payment Option', which offers 'Express Checkout' as the recommended method for merchants familiar with API programming.

My understanding is that if you have website payment pro and pay a charge then the express checkout is free, if you have a seller/business account then you have to pay a fee... please correct me if i am wrong.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

BTW, I'm looking into the paypal checkout express API document to find a solution to keep customers stay in store when they hit the confirmation button. If this works, the customers not returning issue will no longer exist.

there is already a contribution for this here

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I have no SSL and curl is not complied on my shared server, are paypal ok with me sending data unprotected ?

I don't know, read the paypal instructions or FAQ..... my guess is 'no'

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

When you install PayPal IPN do you need to remoce the original PayPal in admin?

It 's up to you, both can stay as they do nothing to conflict against each other but i fail to see the logic of having 2x of any payment module for customers to choose from as they'll only get confused - personally i would keep one and remove the other.

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

It 's up to you, both can stay as they do nothing to conflict against each other but i fail to see the logic of having 2x of any payment module for customers to choose from as they'll only get confused - personally i would keep one and remove the other.

 

Thanks. Just wanted to make sure they were idependent and that IPN did not need the other to work right. Forgive my newness to all this jazz.

Link to comment
Share on other sites

Thanks. Just wanted to make sure they were idependent and that IPN did not need the other to work right. Forgive my newness to all this jazz.

No problem, that's what we're here for :D

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

My understanding is that if you have website payment pro and pay a charge then the express checkout is free, if you have a seller/business account then you have to pay a fee... please correct me if i am wrong.

No, I checked the price for the additional payment option, it's exact the same as business/premier accounts. What I'm not sure is that if paypal charges the 2.4%-3.4% rate + $0.3 flat fee per transaction twice for express checkout API. I need to test to see how it is.

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

there is already a contribution for this here

I probably will not try that one. Instead, I'm trying to use the code in the PayPal Pro Direct Payments & Express Checkout, and keep it as less modification to the IPN module as possible. If the express checkout token initiation failed, then switch back to the standard IPN process.

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

Instead, I'm trying to use the code in the PayPal Pro Direct Payments & Express Checkout, and keep it as less modification to the IPN module as possible.

Yes, my sentiments exactly.

 

I too found this other one after posting my earlier post. I have already asked around and have been told that it will be possible to take out the WPP and keep the API's so it can be possible to do it......

 

...... and yes, it looks like the API's are (unlike WPP) free if you have a business/seller account so i am really going to try and knuckle down after the new year and see if it is possible to use the API's

 

At the moment I am working on a clients site and it is taking up most of my time, hopefully i will try fiddling around with the contribution when i get a chance but if you manage to find anything please let me know

 

Thanks

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

No, this is the first email of this type that I have ever received from any of my clients' stores. The email was sent to my email address as that is the address that is listed in the debug field.

 

The email shown above is not the actual one I received. I just quoted it from this thread because except for the user/order details, it is identical to the email I received. I apologize for not making that clear. The email address listed for the customer in my client's store does not have a dot in it.

 

The weird thing is, upon further investigation, the transaction did eventually get processed. It is marked as a completed transaction in Paypal; it is showing up in the client's Admin under Orders.

 

Here is the information from the order status, if that will give any clues about what happened:

 

11/06/2006 12:49:50 False Pending PayPal IPN Invalid [Pending; address]

11/06/2006 13:20:49 True Processing

11/06/2006 13:24:30 False Pending PayPal IPN Verified [Completed (Unverified; $49.50)]

I know this is a very, very late reply but I'm posting the information in case it helps others:

 

The IPN posts back the payment_status from PayPal every time the status changes. The first status was "pending". The reason for this was "address" which is explained by PayPal as:

The payment is pending because your customer did not include a confirmed shipping address and your Payment Receiving Preferences is set to allow you to manually accept or deny each of these payments.

The customer then returned to the shop, triggering the "processing" status.

 

Once the shop owner accepted the payment, the IPN sent another update, changing the status to "completed" and advising the shop owner that the customer has an unverified account and that the transaction value is is $49.50

 

A full list of codes can be found here (just scroll down until you hit "payment_status":

https://www.paypal.com/IntegrationCenter/ic...-reference.html

 

The status will also change e.g. if an echeck clears, or a refund is issued. Understanding the codes posted back by PayPal (and available in the comments field of the order) is a useful tool for the shop owner.

 

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

VERSION 2.0 PUBLISHED

 

This release contains the following updates:

 

1. Order emails & Stock update moved into ipn.php

standard order email & stock update executed when payment status is "completed"

NEW! short notification email executed when payment status is "pending"

regardless of whether customer returns to shop or not

All other payment_status handled as before

For full overview of possible payment_status please go here: https://www.paypal.com/IntegrationCenter/ic...-reference.html

or check the contribution user guide under "developer notes"

What this means: even if customer does not return to your shop, your stock will be updated and the order emails will be sent.

 

2. Expaned currency support for:

AUD, CAD, CHF, CZK, DKK, EUR, GBP, HKD, HUF, JPY, NOK, NZD, PLN, SEK, SGD, USD

default US Dollars

 

3. Added locale support (language support) for US English, UK English, German, Japanese, and French (default US English)

changes in which language PayPal present itself based on customer's country from their primary address ($order->customer['country']['iso_code_2'])

 

4. Added "force shipping address?" option to IPN

If force shipping address is set to to TRUE, then shipping address is transmitted to PayPal and order can be eligible for Seller Protection. However this setting currently has one remaining bug as customers without PayPal account will have to re-enter their address.

If force shipping is set to FALSE, then order is not eligible for Seller Protection but customers without PayPal account will have their address fields pre-populated.

IMPORTANT! To check whether the order is eligible for Seller Protection you must check the order info in your PayPal account!

 

5. Extensive updates to the documentation including a brand-new FAQ section

 

And the following bug fixes:

 

6. Address details changed to transmit DELIVERY address to PayPal

 

7. Stock update only executed if payment_status is "completed" (otherwise every status changed would trigger stock update)

 

8. Aggregate now only one sum (required to fix problem when IPN is used together with CCGV(trad) and the discount results in a negative sub-total)

 

Remaining issues:

-> shopping cart not emptied if customer does not return to shop

-> problem with pre-populating UK county field for customers without PayPal account

-> If force shipping == True, then customers without PayPal account will have to retype their address

-> The language files could do with translating

-> Integration help files need to be updated due to new code structure

 

===================================

 

I've tested the code thoroughly (I think I've been through checkout around 150x ...) but of course mother nature favours the hidden flaw. Hence please take when installing, back up your old files / database and post any issues / queries on this thread. I am subscribed to this thread, so I will get any posts published here.

 

I hope this new version consolidates the efforts by David, gravyface, AlexStudio and windfjf and adds a few new functions & updates to this module!

 

New version can be downloaded here: http://www.oscommerce.com/community/contributions,2679

 

Terra :thumbsup:

Edited by 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

VERSION 2.0 PUBLISHED

I've just downloaded it and will test it out later.... I'll post back giving my opinion.

 

I did see the help files folder was empty... are the CCGV, Affiliate and QTpro files supposed to be in that folder? After all, the QTPro stock update coding will be different from stock IPN - unless I am losing the plot (if that be the case then I would like to apologise)

 

Thanks Terra

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Remaining issues:

.....

-> Integration help files need to be updated due to new code structure

I did see the help files folder was empty... are the CCGV, Affiliate and QTpro files supposed to be in that folder? After all, the QTPro stock update coding will be different from stock IPN - unless I am losing the plot (if that be the case then I would like to apologise)

Hi Chooch - the integration guides have not yet been written. I will have to write a few as our shops all use CCGV(trad) and Affiliate, and a few also use QTPro but that's a job for the next few days. I'm hoping it's all doable mother nature but as we all know is a bi*** so I'm not counting on anything :D

 

If anybody has time to help out with this would be greatly appreciated!

 

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

Terra,

 

On the option below, does that mean it will just check the address they used for signup compared to their paypal account or will it pull the address from paypal and make them use it for shipping?

 

-eric

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

4. Added "force shipping address?" option to IPN

If force shipping address is set to to TRUE, then shipping address is transmitted to PayPal and order can be eligible for Seller Protection. However this setting currently has one remaining bug as customers without PayPal account will have to re-enter their address.

If force shipping is set to FALSE, then order is not eligible for Seller Protection but customers without PayPal account will have their address fields pre-populated.

IMPORTANT! To check whether the order is eligible for Seller Protection you must check the order info in your PayPal account!

 

If force shipping is set to True the customer's PayPal account address is added to the order on the PayPal pages and shown in the seller's PayPal account under order details.

 

This does NOT mean that the address shown in PayPal's order details is the same as the osCom shipping or billing address, in fact it could be completely different. However, it will allow you to see the address & check whether the osCom shipping address is the same (which would then make the order eligible for the Seller Protection Policy). Previously, this field was simply empty making all orders ineligible so I see this a marked improvement.

 

Hope this explains it a bit better. I strongly recommend to everybody using this IPN to set up PayPal sandbox test accounts and test it in the sandbox to see how this works!

 

To summarise - in osCommerce with PayPal you have 3 different addresses:

osCom shipping address -> shown in osCom admin / order

osCom billing address -> shown in osCom admin / order

Buyers' PayPal account address -> shown in PayPal account in order details

 

PS: it is possible to show the buyer's PayPal account address in the order comment field - I've got the code, so if that would be a prefered solution then I can add it.

 

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

I'd definately like to see the option of showing the buyers paypal confirmed address in the comment field on the invoice. Would make it easier to verify that i'm shipping to that address. Just a thought and thanks for the quick reply to my question!

 

-Eric

Cyber Computing

 

 

PS . Using version 1.3 or 1.4 (whatver the last stable paypal IPN release was) and when a customer paid with Paypal it was still Eligible for Seller protection (atleast it shows that on the payment page in paypal's details ...). Thanks again.

 

If force shipping is set to True the customer's PayPal account address is added to the order on the PayPal pages and shown in the seller's PayPal account under order details.

 

This does NOT mean that the address shown in PayPal's order details is the same as the osCom shipping or billing address, in fact it could be completely different. However, it will allow you to see the address & check whether the osCom shipping address is the same (which would then make the order eligible for the Seller Protection Policy). Previously, this field was simply empty making all orders ineligible so I see this a marked improvement.

 

Hope this explains it a bit better. I strongly recommend to everybody using this IPN to set up PayPal sandbox test accounts and test it in the sandbox to see how this works!

 

To summarise - in osCommerce with PayPal you have 3 different addresses:

osCom shipping address -> shown in osCom admin / order

osCom billing address -> shown in osCom admin / order

Buyers' PayPal account address -> shown in PayPal account in order details

 

PS: it is possible to show the buyer's PayPal account address in the order comment field - I've got the code, so if that would be a prefered solution then I can add it.

 

Terra

Link to comment
Share on other sites

PS . Using version 1.3 or 1.4 (whatver the last stable paypal IPN release was) and when a customer paid with Paypal it was still Eligible for Seller protection (atleast it shows that on the payment page in paypal's details ...).

 

mmh - you may have included a fix posted on this thread but when I tested it with the latest uploaded contrib 1.4 it just said "ineligible", same as for this post: http://www.oscommerce.com/forums/index.php?sho...mp;#entry988159

 

I will publish a small update in the next few days and include the PayPal address in the comments field as requested so keep an eye out for on the contrib section / this thread.

 

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

I'll keep an eye out of the update. I didn't apply any fixes to the IPn i'm using now (downloaded it from the contrib section, maybe someone else already updated it and then uploaded it).

 

It's working so don't want to break it yet =) Will wait until your update comes out to start testing on it.

 

 

mmh - you may have included a fix posted on this thread but when I tested it with the latest uploaded contrib 1.4 it just said "ineligible", same as for this post: http://www.oscommerce.com/forums/index.php?sho...mp;#entry988159

 

I will publish a small update in the next few days and include the PayPal address in the comments field as requested so keep an eye out for on the contrib section / this thread.

 

Terra

Link to comment
Share on other sites

The OsCommerce version I'm running doesn't have a EXT directory because it is a modification to work with PHP-Nuke called PHP-MultiShop (www.php-multishop.com)

 

Do I need this ext directory?

 

I left blank all these areas in the admin cp:

• Page Style

• Your Private Key

• Your Public Certificate

• PayPals Public Certificate

• Your PayPal Public Certificate ID

• Working Directory

Is that ok ? Because I'm not running SSL since I left PayPal collect payments

 

Should I deactivate the PayPal module if I activate the PayPal IPN module?

 

Sorry for my ignorance. I tested it out by placing in cart and checking out and it sent me to the PayPal paying page so I figured it was ok but I try reading and all it's doing is confusing me more so for now I deactivated the IPN module until I know for sure.

 

Thank you.

Link to comment
Share on other sites

Hi Terra,

 

First of all thank you for your effort in making this great contribution even better!

 

Now my question: do you remember my request for a small add-on to make this contribution more or less validated voor Dutch laws.

You can find my question to you here (in this topic).

 

Is it also possible to have the orderno added to the e-mail subject?

 

I personaly think it will also bennefit everyone else who use this contribution.

 

Thanks again!

Edited by i2Paq

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

Hi Terra,

 

Thank you for your contributions!!

 

I am new to here. :D

I downloaded the PayPal IPN 1.5 (or 2.0?) from http://www.oscommerce.com/community/contributions,2679 yesterday. Almost everythings work fine except order status does not change (always remain as "Preparing [PayPal IPN]"). I tried to find out the reason, and the following codes (in ext\modules\payment\paypal_ipn\ipn.php) look strange to me:

if ($result == 'VERIFIED') {

if (isset($_POST['invoice']) && is_numeric($_POST['invoice']) && ($_POST['invoice'] > 0)) {

$order_query = tep_db_query("select currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . $_POST['invoice'] . "' and customers_id = '" . (int)$_POST['custom'] . "'");

if (tep_db_num_rows($order_query) > 0) {

$order = tep_db_fetch_array($order_query);

 

// let's re-create the required arrays

require(DIR_WS_CLASSES . 'order.php');

$order = new order($_POST['invoice']);

 

I suggest to rename one of them.

Please let me know if i made a mistake. ;)

 

Thanks again!

 

Felix

Edited by AstonK2120
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...