Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

I am new to the oscommerce M2.2 , and my store is live now, the problem I am experiencing is that :

 

The paypal ipn (actually in my case for V1.1---V1.3) does create a temporary order in my administration order sections after customer confirm the order they made. However, the shipping date and comments are not shown in the admin.

 

Also, if constomers change address (shipping or billing) , it doesn't update in the admin as well. If can only update when they add or delete some items in their cart. Then I find the orginal order was delete and a new order is created. (for example, after consumer made the confirmation to order 1, they change their mind, they change the shipping/billing address, then it doesn't update in my admin, it only update when they change the items in their shopping cart. Then I find in admin, the order 1 then is no longer exist and instead only order 2 showing there.) why is this happening? This is can be very suprising that when you find your order ID in admin jump from 1 to 10 with showing nothing details about the between. You might wonder what is happening .

 

 

After the payment, if they don't click the returning link , the IPN can only change the status of the order (ex:from preparing to pending) ,but for all others such as shipping/billing address change , comment, delivery date , it doesn't update)

 

If they click the link the comments then pass back to admin, but all the others still no update.

 

so I may have to call my customer up to ask them everthing again, this is not fine.

 

 

 

Please help me out , I appreciate all the contributions here and hope you guys can tell me how to solve my problems.

 

 

Thank you in advance.

Link to comment
Share on other sites

Leo - I know, I know. I did a few updates to the contrib but the basic set-up (with all the problems described by yourself) was done ages ago by the osCom team. I haven't done any work on this recently and am undecided whether to rewrite this wretched thing (because the whole pre-store / duplication thing really is a pain in the backside) or just patch it as best as can be done. Either way - until the IPN is updated, all problems described by yourself are there. 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'm just setting up a store and I'm having a problem with the PayPal IPN contribution where only the sub-total is being passed to Paypal, leaving off the shipping cost. I am not using tax on the site at all, and I am using only US Dollars and English language, for that matter. The only shipping option I include is the Table Rate. OSC works properly when choosing and displaying the shipping cost, even through the IPN order and on the invoice. The only problem is that PayPal shows the subtotal amount to be the OSC subtotal, not the OSC grand total (with table rate shipping added), so I would get stiffed on the shipping every time. I have the IPN set for aggregate transaction type. I'm using the Sandbox server and the IPN's SSL option.

 

How do I make the OSC grand total transfer to Paypal? I thought that is what "aggregate" was supposed to do.

 

Michael

Link to comment
Share on other sites

How do I make the OSC grand total transfer to Paypal? I thought that is what "aggregate" was supposed to do.Michael

Aggregate transfers two values: [total minus shipping] and [shipping]. If shipping is left off, can you check whether you activated a shipping setting in your PayPal account which overrides what the shop sends?

 

If not, and the problem persists, then you can change it to a "true" aggregate by amending the paypal_ipn.php:

 

on line 322 (NB: this is important as you must choose the section of the code which deals with Aggregate) find this and remove:

		$parameters['shipping'] = number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

 

then on line 333 find this:

	  if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') {
	   // PandA.nl move tax to total amount
	   $parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
	   } else {
	   // default
	  $parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
  }

 

and replace with this:

	  if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') {
	   // PandA.nl move tax to total amount
	   $parameters['amount'] = number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
	   } else {
	   // default
	  $parameters['amount'] = number_format(($order->info['total'] - $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
  }

 

the above changes remove the separation of sub-total and shipping and make sure that only one amount is transmitted to PayPal if the module is used in Aggregate mode.

 

Hope this helps! 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

Hi everybody

I've got the account balance v3 installed, and it has been running fine on my site for years. But now I've installed paypal with norwegian currency, which has tested fine, but I need some help on how to mod paypal_ipn.php with the code from my checkout_process file:

 

My modifications in checkout_process looks like this:

 

after

$payment_modules->before_process();

 

// account balance modif
$begin_account_balance_query = tep_db_query("select customers_account_balance from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$begin_account_balance_result = tep_db_fetch_array($begin_account_balance_query);
$begin_account_balance = tep_round($begin_account_balance_result['customers_account_balance'],2);
//end account balance modif

 

before

// lets start with the email confirmation

 

// account balance modif
$order_total_query = tep_db_query("SELECT value FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . (int)$insert_id . "' AND class = 'ot_total'");
$order_total = tep_db_fetch_array($order_total_query);
$account_balance_query = tep_db_query("SELECT value FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . (int)$insert_id . "' AND class = 'ot_account_balance'");
$account_balance = tep_db_fetch_array($account_balance_query);
$ot = tep_round(($order_total['value'] + $account_balance['value']), 2);
// echo $ot;

//if balance is larger than 0, check if balance is more or less than total
if ($begin_account_balance > 0) {  
		//ab = start balance
		$ab = $begin_account_balance; // + tep_calculate_tax($begin_account_balance, $tax);

				//if order total is greater than balance, set balance to zero
		if ($ot > $ab) {
			$account_balance = 0;
		}

				//if balance is greater than the total, subtract from total and leave the rest
		if ($ot < $ab) { 
		$account_balance = $begin_account_balance - $ot; //+ tep_calculate_tax($begin_account_balance, $tax) 
		}
		//if total is the same as balance, set balance to zero
		if ($ot == $ab) {
		$account_balance = 0;
		}

	//when done update the database
	$ending_account_balance = tep_round($account_balance,2);
	$ending_account_balance_query = tep_db_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_account_balance = '" . $ending_account_balance . "' WHERE customers_id = '" . (int)$customer_id . "'");

	//echo $ending_account_balance_query;
}

// end account balance modif

 

Any help with this would be greatly appreciated! Or if you could point me in the right direction that would be great too :)

Link to comment
Share on other sites

Aggregate transfers two values: [total minus shipping] and [shipping]. If shipping is left off, can you check whether you activated a shipping setting in your PayPal account which overrides what the shop sends?

 

Edith, thank you so much. It actually was a setting on Paypal's side. I found this checkbox (below) in the Shipping Calculations section and checked it. Now Paypal accepts the shipping info from my OSC store.

 

Click here to allow transaction-based shipping values to override the profile shipping settings listed above (if profile settings are enabled).

 

Thanks again for your help!

 

Michael

Link to comment
Share on other sites

Hi all

 

 

i'm very new to all this so i apologise if i've missed something obvious --> i'm trying to install this module to see if i can resolve the paypal module issue i'm having (where paypal does not get passed the total (?) and sows as ?0)

 

ok, i dont see any readme or install guide -> i placed the php file in

 

/include/modules/payment/paypal_ipn.php

 

becuase i see that path on some of these posts.

 

i got an error saying that something couldn't be called in

 

/includes/languages/english/modules/payment/paypal_ipn.php

 

so i dropped the php file in that dir also, and not i see this error:

 

Fatal error: Cannot redeclare class paypal_ipn in /usr/local/home/httpd/vhtdocs/essgeelinens/includes/modules/payment/paypal_ipn.php on line 14

 

in the payments modules screen.

 

i hope somebody can point me in the right direction

 

cheers

jg

Link to comment
Share on other sites

Hi all

i'm very new to all this so i apologise if i've missed something obvious --> i'm trying to install this module to see if i can resolve the paypal module issue i'm having (where paypal does not get passed the total (?) and sows as ?0)

 

ok, i dont see any readme or install guide -> i placed the php file in

 

/include/modules/payment/paypal_ipn.php

 

becuase i see that path on some of these posts.

 

i got an error saying that something couldn't be called in

 

/includes/languages/english/modules/payment/paypal_ipn.php

 

so i dropped the php file in that dir also, and not i see this error:

 

Fatal error: Cannot redeclare class paypal_ipn in /usr/local/home/httpd/vhtdocs/essgeelinens/includes/modules/payment/paypal_ipn.php on line 14

 

in the payments modules screen.

 

i hope somebody can point me in the right direction

 

cheers

jg

 

the file that goes in the language directory is different fron the one of the modules. you should have 2 different files (with the same name, I agree) weird that you don' have a read me file with directions. You probably didn't download the full package

Link to comment
Share on other sites

the file that goes in the language directory is different fron the one of the modules. you should have 2 different files (with the same name, I agree) weird that you don' have a read me file with directions. You probably didn't download the full package

 

thank you! i understand what those paths are now (a clue to what file has been updated).

 

great

 

one other question: on the module's Gateway Server settings, it says: Use the testing (sandbox) or live gateway server for transactions?

 

Does this mean i can set it to sandbox and order items as a test - without my card being charged? (or can i even enter bogus credit card numbers?)

 

thanks for all the support

jg

Link to comment
Share on other sites

thank you! i understand what those paths are now (a clue to what file has been updated).

 

great

 

one other question: on the module's Gateway Server settings, it says: Use the testing (sandbox) or live gateway server for transactions?

 

Does this mean i can set it to sandbox and order items as a test - without my card being charged? (or can i even enter bogus credit card numbers?)

 

thanks for all the support

jg

 

Using sandbox will not charge your card (or the paypal account) if you know the bogus CC number for each card type {the 4111, etc...), you may try to use them, but it may not reflect the real situation. What I do when I want to be be sure it works is to buy myself a little something (with another Paypal account, because you can;t buy from yourself) or ask a buddy to buy and then you refund the person

Link to comment
Share on other sites

Using sandbox will not charge your card (or the paypal account) if you know the bogus CC number for each card type {the 4111, etc...), you may try to use them, but it may not reflect the real situation. What I do when I want to be be sure it works is to buy myself a little something (with another Paypal account, because you can;t buy from yourself) or ask a buddy to buy and then you refund the person

 

awesome

 

thanks again for all the help!

jg

Link to comment
Share on other sites

Dear support and fellow oSc users,

 

I have a shop with only one language, swedish, in use. Whenever a customer is transfered to PayPal SSL page the following error msg shows:

 

"You entered unsupported characters in this field. At this time characters for the following languages are available: European languages, Chinese, Korean, Japanese and Thai. Please try again."

 

At first i did not even got the right currency (SEK) to work, but after editing paypal_ipn.php line 279 to $my_currency="SEK" i got that to work :-)

 

So, how can i solve this and get rid of the error-message? anyone?

 

(non of the user data contain special swedish characters ??? ??? BTW)

 

thnx in advance.

 

webshop: http://www.hemmakvarnen.se/catalog

Link to comment
Share on other sites

I haven't had the time to look at it properly, but at a glance, it looks very different to the previous versions.
Doesn't look that different - the main difference is that v1.4 is not a complete package so you'll need to download v1.3 and the update it with the new file from 1.4. The new paypal_ipn.php has two changed sections of code - can be easily compared via something like Winmerge. I haven't tested the fix yet, but if it works then BIG THANKS to windfjf - that fix has been requested many times on 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

in Paypal is says what link do you want your Paypal IPN to go to.........what link url should I put in?

I take it you mean the auto return option? If yes, please read the install guide (copy of relevant text below):

However, you don't have to enable auto return in your PayPal account as the info is sent automatically by the PayPal IPN module. 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

Simple question....

 

For some strange reason my IPN module's title variables do not show up. The variable names themselves show up. For example when I go to payment method the method names shows up as litterally...

 

"MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE"

 

same is true for all "title" variables.

 

how can I fix this?

 

thank you.

Link to comment
Share on other sites

Simple question....

 

For some strange reason my IPN module's title variables do not show up. The variable names themselves show up. For example when I go to payment method the method names shows up as litterally...

 

"MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE"

 

same is true for all "title" variables.

 

how can I fix this?

 

thank you.

 

check the coresponding language file: it's either missing or showing different define names

Link to comment
Share on other sites

check the coresponding language file: it's either missing or showing different define names

 

which would be?

 

How would it be the lang file? They are universial variables and all the ones from PayPal IPN don't work.

 

also why does the script not bring the user back to the site? they have to click return, I have the IPN url setup correctly i believe ([mysite]shop/checkout_proccess.php)

 

thank you, great support btw!

Link to comment
Share on other sites

which would be?

 

How would it be the lang file? They are universial variables and all the ones from PayPal IPN don't work.

 

also why does the script not bring the user back to the site? they have to click return, I have the IPN url setup correctly i believe ([mysite]shop/checkout_proccess.php)

 

thank you, great support btw!

 

could you post here what you see in the following file:

 

catalog/includes/languages/english/modules/payment/paypal_ipn.php

 

You will see where the problem is.. if you find the file ;)

Link to comment
Share on other sites

could you post here what you see in the following file:

 

catalog/includes/languages/english/modules/payment/paypal_ipn.php

 

You will see where the problem is.. if you find the file ;)

 

i see! it was nothing working because the file did not exist!

 

thanks for the help!

Link to comment
Share on other sites

i see! it was nothing working because the file did not exist!

 

thanks for the help!

 

At least today you learned 2 things:

 

1) when a variable is not defined, the variable name is displayed instead of its value

2) sometimes we miss something from the installation read me file...

Link to comment
Share on other sites

Doesn't look that different - the main difference is that v1.4 is not a complete package so you'll need to download v1.3 and the update it with the new file from 1.4. The new paypal_ipn.php has two changed sections of code - can be easily compared via something like Winmerge. I haven't tested the fix yet, but if it works then BIG THANKS to windfjf - that fix has been requested many times on this thread. Terra

 

 

You welcome! :D

I have tested,it work fine

Link to comment
Share on other sites

I've spent hours searching through this forum but I still can't find a response. I just installed the latest version of this contribution (thanks for all the work you guys put in).

 

I've seen this mentioned a few times, but can't find a solution. The status of my orders do not change from "processing" after the payment goes through (the payment goes through fine). I can still operate, but it would really waste a lot of time to go through each one to see if they are orders that are dropped before payment or actual paid orders. (I can tell by the green check mark after going into each order)

 

I read that this has occurred on the godaddy server, but I am on midphase.

 

any solutions?

 

Help!

 

Thanks in advance.

 

Vance.

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