Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal_Shopping_Cart_IPN


devosc

Recommended Posts

Paypal IPN works awesome.. one problem though.. the confirmation email I receive has blank billing and shipping address. Just a blank email template. When I look at the transaction from the admin side, everything is filled out correctly.. its just the email thats blank. Whats going on?

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Rob, I think I now see what you're syaing and seems like a solution but I can't verify this right now, I will try and put the code together and post, but not today.

 

dimports, is the email sent prior to the customer returning to the site or the one generated when they return but the IPN not previously received, I suspect it is the first, i.e the one generated in inlcudes/class/paypal/cart.php which is essentially just the same as the one in catalog/checkout_process.php, see the first page of this thread about getting it to include the Payment Type, i.e PayPal. Anyway when you say a blank email with no fields - can you post it to see.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

It is the email sent after the order has been completed all the way thru. I checked out the first page but I dont think this is the problem because the email states which method of payment was made. Also I was looking further into this and I don't see the order in the orders section in admin. Should it be there as well? Here's the exact email. When I click on the detailed invoice link in the email.. its a "page cannot be displayed" site:

 

 

Design Imports

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

Order Number: 2374297032

Detailed Invoice: https://securehost59.hrwebservices.net/~des...r_id=2374297032

Date Ordered: Sunday 25 January, 2004

 

Products

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

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

 

Delivery Address

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

 

 

,

 

 

Billing Address

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

 

 

,

 

 

Payment Method

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

PayPal IPN

Edited by dimports
Link to comment
Share on other sites

stumped on this one. all I can suggest is that you uninstall the paypal module in the admin section, then copy the original paypal.php back into catalog/includes/payment/ and reinstall it, test a paypal payment and see if you get the email; unfortuanately its a bit hard to guess where to start to debug this one.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

The question is, will this effect us, since, effectively, it states that it will only be the version that is changing in the normal use IPN info...

One of these days, I will actually understand what I just changed...

 

But reading the Manual DEFINATELY helps...

Link to comment
Share on other sites

The PayPal decision to do a refund with a new transaction id is somewhat bewildering.

But the change should not cause any affect, since currently refunds are not supported by 'this contribution' and when in Live Mode only 'Completed' transactions are stored.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

re: Problem with taxes passed via Shopping Cart Method 2 (Itemized)

 

When using option number 2 and finding the total tax rate past by oscommerce was being multiplied by the number of items in the cart I used the following solution:

 

in /catalog/includes/modules/payment/paypal.php

removed this from around line 225:

$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($order->info['tax'] * $currencies->get_value($my_currency),2));

 

and replaced with:

$taxValue = ($order->products[$i]['final_price'] * ($order->products[$i]['tax'] / 100)) * $currencies->get_value($my_currency);

$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($taxValue, 2));

 

I am not sure if there is anything wrong with doing it like this. If so I would appreciate some comments. However for the time being it is working fine for me.

Link to comment
Share on other sites

Lupine -

 

Thanks for the contribution. This fix is working for me! Greg - i hope you'll add this update to your contribution in the download area.

 

The fix doesn't address the two-decimal place truncation issue, so there can still be errors in the final calculation ($0.075 being passed as $0.08). But the only real fix for this is for PayPal to make a change on their side. Even doing something "tricky" (using only one line item in the cart as the "tax conduit") doesn't handle all cases.

 

Rob

Link to comment
Share on other sites

I am in need of assistance. I have installed this contribution. I have almost everything working. EXCEPT, I do not get orders unless the customer clicks continue after submitting their payment via paypal. I have tested with the ipn.html form and the emails are received when testing. But, when I go through and test via the catalog, I do not receive an order unless I click confirm after submitting payment. Also, I just double checked and it looks like the paypal IPN is not listed under the paypal IPN section either. ???

 

Also, I have chosen the Itemized cart method so that when this happen, I will still have all the order information in my paypal email. BUT, it the paypal email does not list all of my options. Some of my products have 5-6 options. Paypal only lists 2 of the options. Any way to increase this?

 

Thanks in advance for any help.

 

Shanna

Link to comment
Share on other sites

Shanna,

 

re: orders not being received after PayPal payment...

 

This is a known "feature" of osCommerce. You won't get the order unless the customer follows the link back to your site after paying via PayPal. The IPN partially addresses this problem by at least giving you notification that a Payment was received, and the Itemized Cart option helps even further. But it's still a nuisance.

 

If it's working properly, the IPN reports will be available to you from the osCommerce "Customers" section of the admin interface (you should find "PayPal IPN" listed beneath "Customers" and "Orders").

 

The restriction to only 2 product "attributes" in the paypal.php code... I believe this is a limitation of the PayPal IPN. The interface provides only two variables for passing extra information for items in the cart.

 

Take a look here:

 

http://www.paypal.com/cgi-bin/webscr?cmd=p...-manual-outside

 

Rob

Link to comment
Share on other sites

I was under the impression that this contibution would fix the issue of not receiving orders if the customer did not click "continue" after after submitting payment. Am I wrong?

 

If this is NOT the case... is there a way I can add a not to the paypal page to tell the customer to continue until they return to the site? Probably not since that would have to be edited via paypal.com. So, any other suggestions?

 

TIA

 

Shanna

Link to comment
Share on other sites

You won't get the order unless the customer follows the link back to your site after paying via PayPal.

 

Are you sure about that?

No, not really sure. I THOUGHT that IPN would send a communication back to the osCommerce store as soon as the customer successfully reached PayPal's "You Made a Payment" page. There's a "Continue" button on that page which will submit a form passing payment details back to the osCommerce store (and redirect the customer there as well). If the customer clicks this button, the order should get logged in the osCommerce database, but -- as far as I understand it -- this is not IPN.

 

IPN is supposed to work independently of the above operation. However, on the osCommerce side of the fence, I don't know whether the IPN transaction BECOMES the order in the event that the customer didn't click "Continue", or whether it merely provides a report that so-and-so has made a payment. I thought that it merely served as a detailed receipt from PayPal, which -- in the absence of an order -- could be used to construct a customer order. I did not think that an IPN transaction alone was able to actually insert a new order into the osCommerce database. But maybe this is my misunderstanding?

 

I tried a test transaction just now, but unfortunately I didn't get any IPN information logged back on my server. I don't know if something's broken on my end (it worked when I was testing it earlier), whether it's just a temporary hiccup, or whether the IPN changes that PayPal implemented today are to blame.

 

Rob (hoping someone will shed more light on this topic)

Edited by bobonala
Link to comment
Share on other sites

hello, gret contri!

I installed it and get good respons,

only Iam from europe and have to count tax

in the paypal screen only the excl vat amount is diplayed, not the total price.

Where do i have to look for. i have a total of 22 contributions added,

including EUVAtintracomm 3.2

wich file to look in?

Keesjan

Link to comment
Share on other sites

lupine, thanks, it does look to be the right solution and I will try and update the contrib soon.

 

An idea came to me earlier this afternoon, that maybe it might be possible to configure php to work to 2 dp via an apache htcacess directive, this might then get osC to perform it's calculations in the same manner as PayPal, but I'm not sure.

 

Rob,

The info you see when viewing the source page where the customer would click the PayPal continue button is an IPN, and consequently osC recieves 2 IPN's one independently from PayPal, which could be classified as the PayPal - osC IPN, and the other is the one that the customer brings with them back to the site upon clicking the PayPal continue button, which could be classified as the customer - osC IPN.

 

Which ever is received first, normally the PayPal - osC IPN, actually generates the order. You can verify this by checking the admin section and seeing the new order and it's IPN prior to you actually clicking the PayPal contiue button.

When the customer returns and should the PayPal - osC IPN already been received the customer is redirected to the checkout_success.php page and you would see 'paypal=authorized' in the url. However if the PayPal - osC IPN has not been received then the order is created as usual.

 

So which ever is received last is considered to be a duplicate and is ignored.

 

But you must remember to configure the IPN url in your PayPal account profile in order to successfully receive the PayPal - osC IPN.

Edited by gregbaboolal

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

I just saw this post,

As of Friday, Feb 13 2004, PayPal now accepts credit card payments from non-members. This new feature, will be automatically activated on Premier and Business account holders and they may start taking Credit Card Payments from buyers using the existing PayPal contribution with no modifications needed.

 

Until now, PayPal has required that buyers open a PayPal account to send funds, and that their credit card number be kept on file, the new system has no such requirements.

 

I've dealt with the hassles of Authorize.net, Humbolt bank and Linkpoint for years, the high monthly charges, the chargebacks that are so easily obtainable thru fraudulent buyers, and the fact that you have to have a commercial bank account which has large opening deposits. them days are over....

If true, it would be interesting to find out how this info is reflected in the IPN's received.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

well gregbaboolal,

the problem is the following:

at checkout we have the folowwing:

 

 

1 x Pro Plan $42.26 (Inc.VAT)

$35.51(Ex.VAT)

 

 

 

 

Sub-Total: $42.26

VAT: $6.75

Total: $42.26

 

in paypal the shopper seean maount of $42.26 wich IS NOT THE TOTAL AMMOUNT

BUT THE SUBAMOUNT EXCLUSIVE TAX

wich parameter difines this?

Edited by helohelo

Keesjan

Link to comment
Share on other sites

A more interesting bit of info is that PayPal now allows you to configure your PayPal profile so that the customer is immediately returned to the shoppingcart website once they click the pay button.

Also via the account profile you are able to customize the PayPal pages alot more, i.e specific background colors etc... See PayPal for more info.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Some of my products have 5-6 options. Paypal only lists 2 of the options. Any way to increase this?
You can adapt the script used in Method 1 that lists all of the product names to be used in Method 2 to list of the products attributes in the os0 field.

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...