Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Now to the problem...I uploaded all and went into test mode. Bought some things, checked out and at some point in the checkout I got an error. It was not liking the ccgv (trad) line in includes/modules/payment paypal_ipn.php

mmh - I haven't tested this yet, but I think your problem is the ipn.php file.

 

Within paypal_ipn.php

*************************************************

Find this code:

tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

$order_products_id = tep_db_insert_id();

 

and below add this:

$order_total_modules->update_credit_account($i);// CCGV

 

*************************************************

find this code:

tep_session_unregister('cart_PayPal_IPN_ID');

 

and below add this:

CODE

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');// CCGV

$order_total_modules->clear_posts();// CCGV

 

*************************************************

 

The problem however is the ipn.php as the code for CCGV works with $order_total_modules

$order_total_modules->apply_credit();// CCGV

.. which doesn't exist in the ipn.php file. It's quite late here in the UK so I don't have a solution but I will have to do this as I've got customer sites to update and I will post the solution once available. We'll either have to re-create $order_total_modules or do this differently. 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

Diane - there is a problem in your shop with the ipn.php.

First please make sure that the ipn.php is correctly uploaded into the new /ext/ structure.

Secondly, make sure that the IPN is switched off in your PayPal account.

Thirdly, please confirm if cURL is enabled on your server or not (you can check in your admin under Tools -> Server Info).

And finally, can you get in touch with your hosting provider and check whether there's any firewall etc in place which could stop communication between PayPal and your shop.

 

(GENTLY SNIPPED)

 

If you get it to work, I'd be grateful if you can post your solution on this thread.

 

all the best, Terra

 

 

Hey Terra thanks for the quick response. I am sorry I was not able to get back to you sooner. So far I have done the following:

 

;) 1. I have verified that the ipn is installed correctly.

It is located in my catalog\ext\modules\payment\paypal_ipn directory

 

;) 2, This is what my ipn.php looks like....I removed all extra lines to save space for posting but the file has the correct spacing.

 

<?php

/*

$Id: paypal_ipn.php,v 1.3.0.0 2006/06/22 19:29:00 Edith Karnitsch Exp $

Copyright © 2004 osCommerce

Released under the GNU General Public License

Original Authors: Harald Ponce de Leon, Mark Evans

Updated by Edith Karnitsch (Terra) with help from PandA.nl, Navyhost and Zoeticlight

*/

chdir('../../../../');

require('includes/application_top.php');

include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

$parameters = 'cmd=_notify-validate';

foreach ($_POST as $key => $value) {

$parameters .= '&' . $key . '=' . urlencode(stripslashes($value));

}

if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') {

$server = 'www.paypal.com';

} else {

$server = 'www.sandbox.paypal.com';

}

$fsocket = false;

$curl = false;

$result = false;

if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {

$fsocket = true;

} elseif (function_exists('curl_exec')) {

$curl = true;

} elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {

$fsocket = true;

}

if ($fsocket == true) {

$header = 'POST /cgi-bin/webscr HTTP/1.0' . "\r\n" .

'Host: ' . $server . "\r\n" .

'Content-Type: application/x-www-form-urlencoded' . "\r\n" .

'Content-Length: ' . strlen($parameters) . "\r\n" .

'Connection: close' . "\r\n\r\n";

@fputs($fp, $header . $parameters);

$string = '';

while (!@feof($fp)) {

$res = @fgets($fp, 1024);

$string .= $res;

if ( ($res == 'VERIFIED') || ($res == 'INVALID') ) {

$result = $res;

break;

}

}

@fclose($fp);

} elseif ($curl == true) {

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://' . $server . '/cgi-bin/webscr');

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_TIMEOUT, 30);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

$result = curl_exec($ch);

curl_close($ch);

}

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']);

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment(paypal_ipn);

// let's update the order status

$total_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $_POST['invoice'] . "' and class = 'ot_total' limit 1");

$total = tep_db_fetch_array($total_query);

$comment_status = $_POST['payment_status'] . ' (' . ucfirst($_POST['payer_status']) . '; ' . $currencies->format($_POST['mc_gross'], false, $_POST['mc_currency']) . ')';

if ($_POST['payment_status'] == 'Pending') {

$comment_status .= '; ' . $_POST['pending_reason'];

} elseif ( ($_POST['payment_status'] == 'Reversed') || ($_POST['payment_status'] == 'Refunded') ) {

$comment_status .= '; ' . $_POST['reason_code'];

}

$order_status_id = DEFAULT_ORDERS_STATUS_ID;

if ($_POST['mc_gross']/$order['currency_value'] >= $total['value'] || $total['value'] - $_POST['mc_gross']/$order['currency_value'] <= 0.02 ) {

if (MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) {

$order_status_id = MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID;

}

}

// Let's see what the PayPal payment status is and set the notification accordingly

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

if ( ($_POST['payment_status'] == 'Pending') || ($_POST['payment_status'] == 'Completed')) {

$customer_notified = '1';

} else {

$customer_notified = '0';

}

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . $order_status_id . "', last_modified = now() where orders_id = '" . $_POST['invoice'] . "'");

$sql_data_array = array('orders_id' => $_POST['invoice'],

'orders_status_id' => $order_status_id,

'date_added' => 'now()',

'customer_notified' => $customer_notified,

'comments' => 'PayPal IPN Verified [' . $comment_status . ']');

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

// If the order is pending, then we want to send a notification email to the customer

// If the order is completed, then we want to send the order email and update the stock

if ($_POST['payment_status'] == 'Completed') { // START STATUS == COMPLETED LOOP

// initialized for the email confirmation

$products_ordered = '';

$total_tax = 0;

// let's update the stock

#######################################################

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // PRODUCT LOOP STARTS HERE

// Stock Update - Joao Correia

if (STOCK_LIMITED == 'true') {

if (DOWNLOAD_ENABLED == 'true') {

$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename

FROM " . TABLE_PRODUCTS . " p

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa

ON p.products_id=pa.products_id

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad

ON pa.products_attributes_id=pad.products_attributes_id

WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";

// Will work with only one option for downloadable products

// otherwise, we have to build the query dynamically with a loop

$products_attributes = $order->products[$i]['attributes'];

if (is_array($products_attributes)) {

$stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";

}

$stock_query = tep_db_query($stock_query_raw);

} else {

$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

}

if (tep_db_num_rows($stock_query) > 0) {

$stock_values = tep_db_fetch_array($stock_query);

// do not decrement quantities if products_attributes_filename exists

if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {

$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];

} else {

$stock_left = $stock_values['products_quantity'];

}

tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {

tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

}

}

}

// Update products_ordered (for bestsellers list)

tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

// Let's get all the info together for the email

$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);

$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];

$total_cost += $total_products_price;

// Let's get the attributes

$products_ordered_attributes = '';

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

$products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value'];

}

}

// Let's format the products model

$products_model = '';

if ( !empty($order->products[$i]['model']) ) {

$products_model = ' (' . $order->products[$i]['model'] . ')';

}

// Let's put all the product info together into a string

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . $products_model . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

} // PRODUCT LOOP ENDS HERE

#######################################################

// lets start with the email confirmation

// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {

$email_order .= strip_tags($order->totals[$i]['title']) . ' ' . strip_tags($order->totals[$i]['text']) . "\n";

}

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n") . "\n";

}

$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n") . "\n\n";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

//begin emptying cart for everyone!

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $_POST['custom'] . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $_POST['custom'] . "'");

//end emptying cart for everyone

} // END STATUS == COMPLETED LOOP

if ($_POST['payment_status'] == 'Pending') { // START STATUS == PENDING LOOP

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_PAYPAL_PENDING_NOTICE . "\n\n";

tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

} // END STATUS == PENDING LOOP

}

}

} else {

if (tep_not_null(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL)) {

$email_body = '$_POST:' . "\n\n";

foreach ($_POST as $key => $value) {

$email_body .= $key . '=' . $value . "\n";

}

$email_body .= "\n" . '$_GET:' . "\n\n";

foreach ($_GET as $key => $value) {

$email_body .= $key . '=' . $value . "\n";

}

tep_mail('', MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL, 'PayPal IPN Invalid Process', $email_body, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

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

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

if (tep_db_num_rows($check_query) > 0) {

$comment_status = $_POST['payment_status'];

if ($_POST['payment_status'] == 'Pending') {

$comment_status .= '; ' . $_POST['pending_reason'];

} elseif ( ($_POST['payment_status'] == 'Reversed') || ($_POST['payment_status'] == 'Refunded') ) {

$comment_status .= '; ' . $_POST['reason_code'];

}

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . ((MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) ? MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID : DEFAULT_ORDERS_STATUS_ID) . "', last_modified = now() where orders_id = '" . $_POST['invoice'] . "'");

$sql_data_array = array('orders_id' => $_POST['invoice'],

'orders_status_id' => (MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) ? MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID : DEFAULT_ORDERS_STATUS_ID,

'date_added' => 'now()',

'customer_notified' => '0',

'comments' => 'PayPal IPN Invalid [' . $comment_status . ']');

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

}

}

}

require('includes/application_bottom.php');

?>

 

:) 3. This is what my Pay Pal settings look like

Instant Payment Notification Preferences Back to Profile Summary

 

 

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

 

 

PayPal's Instant Payment Notification (IPN) allows you to integrate PayPal payments with your website back-end operations.

 

Instant Payment Notification (IPN) Off

Instant Payment Notification (IPN) URL:

 

 

;) 4. Here is my server info

curl

CURL support enabled

CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

 

:) 5. Going to contact my host shortly and get back to you.

 

Sorry if I posted to much info I just wanted you to have all the facts in front of you in hopes that it will help. It is probably something stupied that I have done.....but ya never know LOL

 

anyway thanks and I will get back to you,

 

Diane

Link to comment
Share on other sites

Could someone please start a new tread, this one is getting to long. Especialy now that we have the 2.2 release.

 

Is there no moderator watching? (guess not :-" )

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

No, we don't any new thread started, because the mods will either have to delete the old thread (which would lose a lot of valuable information), or else we'll end up with people posting to two separate threads on the same subject.

 

Advising people to only post to the new thread won't work, because past experience shows that people just post their problem without reading other posts. Also, some people will choose to use one of the older versions until compatibility issues with add-ons such as CCGV are sorted out.

 

Vger

Could someone please start a new tread, this one is getting to long. Especialy now that we have the 2.2 release.

 

Is there no moderator watching? (guess not :-" )

Link to comment
Share on other sites

Hey Terra this is the response from my host.

 

fsockopen does work for connecting to any url that is on port 80. If its using another port it won't work. We have a firewall for our shared ip customers, so we can track banwidth effectively. If you need to connect to ports other than 80, then this requires you buy a dedicated ip from us, which costs an additional $30.00 per year. You can email support along with the last 4 digits of your on file credit card and request the dedicated ip, or give us a call at 888-401-4678.

 

Hope this helps

 

Now I believe it is already set to use port 80 but wanted to check...any help would be appreciated as I am definately out of my element.

 

Diane

Edited by dfield22
Link to comment
Share on other sites

Hey Terra this is the response from my host.

 

fsockopen does work for connecting to any url that is on port 80. If its using another port it won't work. We have a firewall for our shared ip customers, so we can track banwidth effectively. If you need to connect to ports other than 80, then this requires you buy a dedicated ip from us, which costs an additional $30.00 per year. You can email support along with the last 4 digits of your on file credit card and request the dedicated ip, or give us a call at 888-401-4678.

 

Hope this helps

 

Now I believe it is already set to use port 80 but wanted to check...any help would be appreciated as I am definately out of my element.

 

Diane

 

OK I think I got it .... My php version is 4.4.4 so we would be using port 443 instead of 80 from the line of code below. I am going to test it by changing to port 80 here and I will let you know

 

if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {

$fsocket = true;

} elseif (function_exists('curl_exec')) {

$curl = true;

} elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {

$fsocket = true;

Link to comment
Share on other sites

OK I think I got it .... My php version is 4.4.4 so we would be using port 443 instead of 80 from the line of code below. I am going to test it by changing to port 80 here and I will let you know

 

if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {

$fsocket = true;

} elseif (function_exists('curl_exec')) {

$curl = true;

} elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {

$fsocket = true;

 

 

I am getting this from pay pal :

 

We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.

 

Message 3005

 

Anyone else getting this message or is it due to my settings?

Link to comment
Share on other sites

No, we don't any new thread started, because the mods will either have to delete the old thread (which would lose a lot of valuable information), or else we'll end up with people posting to two separate threads on the same subject.

 

Advising people to only post to the new thread won't work, because past experience shows that people just post their problem without reading other posts. Also, some people will choose to use one of the older versions until compatibility issues with add-ons such as CCGV are sorted out.

 

Vger

 

Personaly I think a thread of more then 100 pages is more confusing and unreadable.

You could also close the "old" thread and as last reply point people to the new topic.

 

But hee, this is not my forum. :thumbsup:

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

I am getting this from pay pal :

 

We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.

 

Message 3005

 

Anyone else getting this message or is it due to my settings?

 

 

SOOOOOOOOOOO I called Pay Pal and they have been having a problem since early last evening that has a major impact on us all. They cannot process our payments. The work around that I was told was to send a money request to the customer and that will go through to get your money. ( Of course it will not update our database. However can you imagine all the sales that are being lost if you have pay pal as your only payment source. Makes me think I definately need some sort of disaster plan with a back up payment source. THINGS THAT MAKE YOU GO HMMMMMMMMM!

 

Please note that this is a Pay Pal issue and not an issue with the IPN

Edited by dfield22
Link to comment
Share on other sites

Out of interest, what are people doing to stop customers entering different shipping details on their orders.

I assume Paypal only accept the transaction on their systems if the address is same as cardholder - but it doesn't stop users requesting different addresses within the oscommerce side.

Link to comment
Share on other sites

Hi guys,

 

Please help me this problem

 

Yesterday I have installed osCommerce_PayPal_IPN_v2.2 on my site.

 

All I have done was uploaded ipn.php and paypal_ipn.php in to appropriate folders. I never edited or changed any of the existing documents.

 

I have tested everything and everything seemed to work fine.

 

When I saw the error in Shopping Cart today I have errased all of the files associated with osCommerce_PayPal_IPN_v2.2 module but that did not fix the problem

 

I have been using osCommerce on my site since August of 2006 and I have never seen this error before. Today I was puzzled to find out that when you go on my site and start randomly clicking on different tabs (not "add to cart" tabs) after a while you should see your shopping cart start filling up with random items from the catalog.

I have never seen this before and I believe it did not happen before today. I went to the Who's Online option in the Admin page and I found out that when the shopping cart starts filling up at random it always belongs to the same "Guest" user with this criterias:

 

05:50:21 0 Guest 66.45.38.59 13:51:02 19:41:14 /catalog/login.php?osCsid=cebade473d6fd32ffbf3ec2738f19ed1

 

what strange is that even though this problem happens to different guests on my website with different ip addresses the time of entry is always the same "13:51:02 " it seems that the bug is jumping from guest user to guest user and assigns that guest user old time of entry - 13:51:02

 

I do not know if what i am saying makes any sense. But this is what I am seeing.

 

Please go to www.wesellsupplies.com and check this out for your self.

 

I am very puzzled and I dont know what to do with it

 

I appreciate any help anyone can offer.

Link to comment
Share on other sites

I have just installed "osCommerce PayPal IPN Module v2.2 For 2.2MS2" into my store which have not been modified before. Everything is good, data is updated into database after purchase was done. Except email was not sent out to customer. I tried the original Credit card payment module that came with the program and it works well. Can someone help me in gettting email to be sent out to customer?

Link to comment
Share on other sites

When I saw the error in Shopping Cart today I have errased all of the files associated with osCommerce_PayPal_IPN_v2.2 module but that did not fix the problem
Please start a new thread - this is NOT a PayPal IPN problem. The payment module only affects checkout & payment method, it does not alter shopping cart functionality etc. It looks like you have a problem with sessions & customers sharing/seeing each other baskets. Please start a new thread or search this forum for "session / customer seeing each other baskets" posts. all the best - Terra 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

OK I think I got it .... My php version is 4.4.4 so we would be using port 443 instead of 80. I am going to test it by changing to port 80 here and I will let you know
Once PayPal has resolved its issues can you post which code changes worked for you? I'm doing a small update to the IPN and would be good to put this into the FAQ section. 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

Integration Guide

PayPal IPN v2.2 with Imprint Text Options v1.3.1

 

In /includes/modules/payment/paypal_ipn.php find around line 216

 $order_products_id = tep_db_insert_id();

 

and immediately below add

// denuz text attr

$attr_q = tep_db_query("select * from customers_basket_text_attributes where session_id = '$_SESSION['osCsid']' and products_id = " . tep_get_prid($order->products[$i]['id']));
while ($attr = tep_db_fetch_array($attr_q)) {
   tep_db_query("insert into orders_text_attributes values ($insert_id, " . tep_get_prid($order->products[$i]['id']) . ", " . $attr['products_text_attributes_id'] . ", '" .  $attr['products_text_attributes_text'] . "')");
}
tep_db_query("delete from customers_basket_text_attributes where products_id = " . tep_get_prid($order->products[$i]['id']) . " and session_id = '" . $_SESSION['osCsid'] . "'");

// eof denuz text attr

 

Pleas note the change from $osCsid to $_SESSION['osCsid']. Not tested but in theory should work :thumbsup:

 

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

I have got some troubles implementing Paypal onmy shop.

 

I have been tryin to install it in my development site, my backup site, and my live-site.

My live site is running 051113, development has been upgraded to 060817.

 

It does not work for me. I copy the files as written in the installationguide. I also see the addon in modules/payment, and i have configured the module, and made sure its active (true).

 

However, when ever a customer wants to checkout, they can only choose COD og Banktransfer. Paypal is not an option at checkout. I tried another paypal mod, that does not work either. I then tried to add another mod for payment, that worked fine too.

 

I tried to make an upgrade of dev site from 051113 to 060817 and everything works fine, except no PayPal (and different look).

 

Any ideas why paypal does not show as an option?

Timo Jensen

Link to comment
Share on other sites

I've just added VAT onto my products and paypal is transferring the value into the subtotal but there is nothing next to the "VAT" is this normal - is it supposed to just add vat / tax into the top figure and not split it out like you see it on the checkout_confirmation page in oscommerce ?

Link to comment
Share on other sites

i cant get this to work.. my brain is going to melt.. someone want to help me out?

return it to: www.yourdomain.com/yourshop/checkout_process.php

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

However, when ever a customer wants to checkout, they can only choose COD og Banktransfer. Paypal is not an option at checkout. I tried another paypal mod, that does not work either. I then tried to add another mod for payment, that worked fine too.

Make sure that each payment module has a unique sort order in your shop admin. Modules with the same sort order can cancel each other out. hope this helps! 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

what do i put for a url at paypal for the return IPN address? the osc side of the program seems to work .. i just cant get the info from paypal to work

Nothing - you don't have to switch on the IPN in your PayPal account, in fact it usually causes a problem. But if you want to play around, please read the user guide section "paypal account settings" - it has all the info you need. 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

I am having trouble installing osCommerce PayPal IPN Module v2.2 For 2.2MS2

When I execute the 'install' button within payment modules, I get

thrown to the following error page:

 

1406 - Data too long for column 'configuration_description' at row 1

 

insert into configuration (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, set_function, date_added) values ('Force shipping address?',

'MODULE_PAYMENT_PAYPAL_IPN_SHIPPING', 'False', 'If TRUE the address details

for the PayPal Seller Protection Policy are sent but customers without a

PayPal account must re-enter their details. If set to FALSE order is not

eligible for Seller Protection but customers without acount will have their

address fiels pre-populated.', '6', '4',

'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

 

[TEP STOP]

 

I've tried previous version 2.1, and the same thing. If I try earlier than

that say 1.0 or 1.1 it works fine. I am using MYSQL5, php4x, IIS6 Windows

2003. Fresh install of osCommerce 2.2 Milestone 2 Update 060817.

 

Thanks for any help

Link to comment
Share on other sites

return it to: www.yourdomain.com/yourshop/checkout_process.php

 

 

yeah i tried it with that setting and without it . the return works. .but for somereason its not communicating with the store so that it can change its order status

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