Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Terra, I am trying to pass on to Paypal the order number in the "item_name" parameter, so that, even with everything aggregated, the customer is not paying for "Mom and Pop's shop", but for "Mom and Pop's shop order 12345".

 

I try to change in paypal_ipn:

		$parameters['item_name'] = STORE_NAME;

 

to

		$parameters['item_name'] = STORE_NAME . ' order ' . $order_id;

 

But Paypal still doesn't show the order number. Do you know how I should format this line to pass this variable?

 

Thank you very much.

Link to comment
Share on other sites

Is anyone else having this problem. I am in test mode and sandbox does not have a link back to the my site...How does one work around that. What they have is after you have put in your credit card information and what looks to have been accepted...it has a screen asking me to put in information to make my next transaction faster by saving my information...

Enter a password below to save your information with PayPal

then a spot for your email

create account password

confrim password

then a continue button....however the continue button is very clearly stated enter your information, not go back to the site....

So I tried putting information to see if it would eventually bring me to a spot where I could go back to the site, and it does not, in fact after I put in some information, then it asks me to log in (to paypal - Sandbox) and then I get an error 3005

 

So first off, if a person does not want a paypal account and just wants to buy something off your site, it would feel to them that they are getting pushed into having an account, not to mention messing up my order process.

So if the contribution needs the customer to come back to process, how are we going to get around it.

Teresa

Link to comment
Share on other sites

So first off, if a person does not want a paypal account and just wants to buy something off your site, it would feel to them that they are getting pushed into having an account, not to mention messing up my order process.Teresa
I'm sorry but that's the way PayPal works - if a customer chooses not to open an acount, they will be asked to open one after the transaction. With the PayPal IPN however, the order is processed regardless of whether the customer returns or not. all the best - Terra

PS: the 3005 error is currently quite common .. it means PayPal are having problems with their server. It's an error on their side, so nothing you can do about it.

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

Sorry, I am new, WHat is paypal ipn? Is it the latest paypal pro module?

No - the IPN has nothing to do with PayPal Payment Pro. The IPN is for accepting payments vai the standard PayPal business accounts. There is a different module for PayPal Pro:

http://www.oscommerce.com/community/contri...arch,paypal+pro

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

Terra, I am trying to pass on to Paypal the order number in the "item_name" parameter, so that, even with everything aggregated, the customer is not paying for "Mom and Pop's shop", but for "Mom and Pop's shop order 12345".
You've got the variable wrong - try this:
$parameters['item_name'] = STORE_NAME . ' order ' . substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);;

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

Hi,

 

I have a problem when customer choose PayPal on my shop. PayPal site is than displayed in non english language. I have written to PayPal and they suggest to add folowing item into form whcih is sent to PayPal from PayPal IPN module:

 

<input type="hidden" name="lc" value="US">

 

Is there anything else which I can try to force PayPal to be for customer presented in English language?

It is always presented in Dutch language, not sure why it is. Is somehow parameter of shop's location used in PayPal IPN?

 

Thank you for your kind help

 

--

richard vanek

www.piskoftak.com

Link to comment
Share on other sites

I have a problem when customer choose PayPal on my shop. PayPal site is than displayed in non english language. I have written to PayPal and they suggest to add folowing item into form whcih is sent to PayPal from PayPal IPN module:

<input type="hidden" name="lc" value="US">

Is there anything else which I can try to force PayPal to be for customer presented in English language?

It is always presented in Dutch language, not sure why it is. Is somehow parameter of shop's location used in PayPal IPN?richard vanek

Hi Richard - just lost my entire post thanks to a keyboard glitch ... arg, okay here I type again. Your IPN transmits two variables which influence the log in page language.

 

First - it transmits

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

which is based on the customer's primary address.

 

Secondly, if your shop is set to "force shipping FALSE" then it also transmits

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

which is based on the order delivery address and overrides the lc setting

 

To force customers to use an english log in page you could

A. change the lc variable to $parameters['lc'] = 'US';

and B. delete the country variable (bearing mind that this will mean that for customers paying without PayPal account the country field won't then be pre-populated)

 

For more advice please have a look at the PayPal developer forum thread:

http://www.pdncommunity.com/pdn/board/mess...message.id=3398

 

Please also bear in mind that the language setting ONLY influences the log in page ... if a customer has a PayPal account, then all subsequent languages are shown in the language specified in their account settings.

 

all the best - Terra

 

PS: out of curiosity - why do you want to force an english log in page & not Dutch?

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

It works perfectly, thank you very much.

my pleasure! happy coding :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

Thank you for so quick answer.

I am using older version of PayPal IPN, I believe one of the earliers. Frankly I made so many modifictaion ot my shop that I am afriad to install any new module, it always take so incredible long time to check :-)

 

PS: out of curiosity - why do you want to force an english log in page & not Dutch?

 

Well it is simple 95% of my customers are not Dutch :-) My web site is in English and therefore I like to keep it the same way when it goes to PayPal.

 

If of course customer has PayPal account than it is logical it will use his/her preset language.

 

Once more thanks a lot for help!

 

--

richard vanek

www.piskoftak.com

Link to comment
Share on other sites

I'm sorry but that's the way PayPal works - if a customer chooses not to open an acount, they will be asked to open one after the transaction. With the PayPal IPN however, the order is processed regardless of whether the customer returns or not. all the best - Terra

PS: the 3005 error is currently quite common .. it means PayPal are having problems with their server. It's an error on their side, so nothing you can do about it.

 

The new version 2.xx works that way, but I haven't upgraded yet as there is still no itegration for CCGV - I've been testing 2.xx, but roll back after testing to what has been more or less, working...(I still can't get emails sent to anyone on a consistent basis). So if I am on 1.3, not going back to the site IS an issue, isn't it?

 

Today I am going to try and roll ccgv out temporarily as I don't use it a lot, and upgrade to the latest, hoping that will solve my email problems and the "not returning to site" isssue. Since I am upgrading form so far back is there anything that I should be changing in other files, say shopping_cart, checkout_process...When looking at the newer files (2.0, 2.1, 2.2) the only thing there is the ipn files no changes to other files. So if a person was putting this in for the first time, it looks like nothing should be changed anywhere else. If that is indeed true than should a person who has older versions go back and take out any older stuff ( I mean aside from filenames for defining and such.

Teresa

Link to comment
Share on other sites

Teresa - all files have been changed so to install a newer version you need to:

1. uninstall the IPN module in your admin

2. upload the new files (all 3)

3. re-install the IPN in your admin

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

thanks Terra,

You're the best...I am presently backing out ccgv(trad), just about done and then I will update and test...

BTW how is work on the integration stuff going, any progress? I'd love to help in anyway I can, I have a pretty mininally visited site that I can test on without worrying to much, if you need someone to do that...Don't know a ton of php but I am getting more knowledgeable every day.

Best Wishes

Teresa

Link to comment
Share on other sites

WOOF!....I did it. Seems to be working too. Took me 2 hours to get past the following error..

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/w0511/d09/s01/a00091qk/www/BNWeb/catalog/includes/functions/database.php on line 99

and a few minor ccgv(trad) stragglers I missed in backing out, but after testing through sandbox 3 times now, I think its happy....Only thing I am still looking into is it still doesn't seem to be sending "the customers" checkout confirmation email, but like I said, it wasn't doing that before. I thought maybe it was the Package Tracking with Email Mods but as I was pulling out ccgv, I pulled out that too just to see if that was the culprit...apparently not. If you have any suggestions, I'd be happy to hear them...Thanks again for all that you do!

Teresa

Link to comment
Share on other sites

Terra,

 

The problems seems to have been solved by switching to "aggregate total" transfer to paypal. But do we know why this error occurs and why is it recommendable to transfer "aggregate total" instead of "per item" transaction to paypal. The reason I ask is if I am the cutomer I would really like to look at what I am paying for instead of just a total displayed to paypal when I make my final payment, its a good sense of comfort.

 

Is there a way to display the items in the shopping cart without going to the " per item" format. If not, are we trying to solve this bug in the next releases of the paypal IPN.

 

Thanks for your input as always.

 

Amit

So does anyone know whats the issue of using aggregate vs. Per Item transaction trasnfer to PayPal. I know there is a problem because it does not work and the incorrect shipping amount is transferred with some multiple item transactions.

 

Is this a solvable issue and something being worked on by the coders. I just hate not to show the customer any order details when they are ready to pay for the order. Is there another way out of this.

 

Can we display items or other details of the order during check out at PayPal without messing up the shipping total or some other problem. The per item option with a multi-item order transfers an incorrect shipping charge to paypal and thats a problem.

Link to comment
Share on other sites

Hi,

 

I Installed Paypal IPN version 3.1.5. Since then, when we go to Paypal site, the orders don't get the tax right.

 

example, on our site we get:

49.99

7.99 transport

8.08 tax (correct tax)

 

and on Paypal site, we get:

49.99

7.99 transport

6.97 tax

 

Also, it seems that once in a while, we only get the basic amount (49.99) charged and no transport and no tax on Paypal site.

 

Another question: is there a way to send the invoice numebr (from our side) so that it would appear on Paypal site when we check for payments?

 

Thanks,

 

Pierre Forget

Link to comment
Share on other sites

I Installed Paypal IPN version 3.1.5. Since then, when we go to Paypal site, the orders don't get the tax right.Pierre Forget
Pierre - this is the wrong support thread. This thread is only for queries regarding:

http://www.oscommerce.com/community/contributions,2679

 

I think your support thread is here:

http://www.oscommerce.com/forums/index.php?sho...=72942&st=0

 

using the right support thread keeps the forum managable. Many thanks, 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

Hi Terra

 

Thankyou very much for the reply before. I have tried to change the paypal selected currency, but only USD, CAD, EUR, GBP, JPY show. So I selected "Selected Currency". I have done everything else but still seems to be a no go.

 

You said I needed a PayPal Business Account. At the moment I am just using my basic PayPal account which I use for eBay purchases etc. Do I need to start up a new one? If so which one? (The paypal site is a bit confusing :)

 

Here is the site : www.nzipodrepairs.com

 

Login Details:

Email : [email protected]

Password: password

 

 

Any help would be very much appreciated.

 

Many many thanks,

Thomas

Link to comment
Share on other sites

I've poked around through a number of pages on this thread, but I'm still not sure if this is the contribution I'm looking for.

 

I am looking to use PayPal's Website Payments Standard to accept both credit cards and PayPal transfers on my website. Currently, I have the default PayPal payment module that came installed with OsCommerce. Whne I do a test checkout, it goes something like this:

 

1) Checkout

2) Confirm Shipping Options

3) Confirm Payment Options ( "PayPal is currently the only payment method available" )

4) Confirm Order

5) Customer sent to PayPal website for payment

 

Obviously, this is a bit confusing for those customers wishing to use a credit card for payment. I would like it to be more obvious that the customer is going to be sent to PayPal's site beforehand, regardless of their intended payment preference. Then afterwards, I want them bumped back to my site for a final confirmation page.

 

Is this the contribution I want to accomplish this?

Link to comment
Share on other sites

So does anyone know whats the issue of using aggregate vs. Per Item transaction trasnfer to PayPal. I know there is a problem because it does not work and the incorrect shipping amount is transferred with some multiple item transactions.

 

Is this a solvable issue and something being worked on by the coders. I just hate not to show the customer any order details when they are ready to pay for the order. Is there another way out of this.

 

Can we display items or other details of the order during check out at PayPal without messing up the shipping total or some other problem. The per item option with a multi-item order transfers an incorrect shipping charge to paypal and thats a problem.

Terra,

 

Any thoughts on this ?

 

Amit

Link to comment
Share on other sites

Ok, I'm back. Saw some question not answered for a while. If anybody don't like my post, please just ignore.

 

Answer to Per Item problems:

 

PayPal does not allow shipping tax and handling tax, so the only way to send the correct shipping/handling amount is to use aggregate mode, which only the total amount sent to paypal without item details.

 

If you applied shipping tax with per item option, the tax total in osCommerce is item tax total + shipping tax + handling tax (if any). Paypal only added up item tax but ignored shipping/handling tax, so the tax total couldn't match, and failed the payment.

 

I did try to fix it but no way. It just can't be done with the standard button code.

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

Thankyou very much for the reply before. I have tried to change the paypal selected currency, but only USD, CAD, EUR, GBP, JPY show. So I selected "Selected Currency". I have done everything else but still seems to be a no go.

Thomas - YOU MUST CHANGE YOUR LOG IN DETAILS IMMEDIATELY!!

Do never, ever post your log in details on a forum. What you've just done means that your site is open to everbody - they can abuse your email funcationality to send out spam (thousands within minutes), delete all your files, find out sensitive information about the server ... please, please change this ASAP! If your hosting provider finds out that your admin is wide open they can shut your account down as it's a big security risk.

 

Okay, I'm hoping you're now off to your site to change the password. Once that's done, continue reading:

 

Your currency problem is because you're using an old version of the PayPal IPN. To upgrade the currency you will need to replace

	  if (MODULE_PAYMENT_PAYPAL_IPN_CURRENCY == 'Selected Currency') {
	$my_currency = $currency;
  } else {
	$my_currency = substr(MODULE_PAYMENT_PAYPAL_IPN_CURRENCY, 5);
  }
  if (!in_array($my_currency, array('AUD', 'CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
	$my_currency = 'USD';
  }

with

	 if (MODULE_PAYMENT_PAYPAL_IPN_CURRENCY == 'Selected Currency') {
	$my_currency = $currency;
  } else {
	$my_currency = substr(MODULE_PAYMENT_PAYPAL_IPN_CURRENCY, 5);
  }

  if (!in_array($my_currency, array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD', 'USD'))) {
	$my_currency = 'USD';
  }

in your paypal_ipn.php file. I think that should do the trick.

 

As for business account - please go to your PayPal account & read their help section. Upgrading simply means undergoing some more security checks, nothing scary & no additional costs.

 

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

Thank you VERY MUCH for this contribution - I've been testing in paypal sandbox and it seems to be working a treat!! Orders being updated, order emails sent etc even with non-returning customer.

 

I know there is an issue with per item Vs aggregate regarding amounts transferred to paypal. I am not VAT registered and am not applying any tax to orders at present. Is this purely a tax problem? I too would prefer to use per item because it is better for the customer to see what they are paying for. Do you think I could get away with per item since I am not applying tax? Would the amounts passed to paypal then be correct? I do not have CCGV installed.

 

Any comments appreciated.

Thank you

Tigergirl

B)

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

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

PM me? - I'm not for hire

Link to comment
Share on other sites

If you only add tax to item, per item should work, but you still need to try. The bottom line is not to add tax to shipping/handling with per item option.

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

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