Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal IPN v0.98 for Milestone 2 released!


Guest

Recommended Posts

Hi,

 

I just installed the latest paypalipn to my store and it showed up the "paypal IPN" payment option. After selecting it and clicking "continue" button, it went to order-confirmation page with the price, tax, shipping, and total info. But, after clicking the "confirm order" button, I got the "This page cannot be found" error! It did not switch to paypal site for making payment. Has anyone experienced this before? Any idea how to fix? Thanks for help.

 

KF

It might be the NOTIFY URL in the Admin --> Modules --> Payment --> PaypalIPN ...check to see it is where you say it is....

Link to comment
Share on other sites

  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

Hi all,

 

I was looking at the code for the ipn and ran across "mysql_num_rows".

I didn't understand what it did exactly so I looked it up in the manual.

It says to only use mysql_num_rows after an UPDATE, DELETE, or INSERT.

 

I noticed that it is used in the script after a SELECT statement. The manual says

to use "mysql_affected_rows" after a SELECT.

 

Is there a particular reason you have used _num_ instead?

 

Am I misunderstanding something?

 

Thanks,

Brandon

Link to comment
Share on other sites

Help a newbie and have a chuckle at the same time!

 

I am new to this and have installed snapshots of osCommerce a few times. But now I am trying to do a clean install of this contribution and am stuck on step 2. Here's where you can laugh. (I am!) I have no idea what to do. (Remember your first time with phpmyAdmin?)

 

It says "Go to phpmyAdmin and select your new MySQL database adn load the sql file: SECv2_2MS2GV\MySQL Changes\NEW INSTALL\oscMS2SECGV_v2_2.sql file"

 

1. Exactly how do I do this? I can get to phpmyAdmin and get to my empty database file and then I don't know what to do.

 

2. Some of the posts I have read say I have to load it in two parts because it is big. So how would I go about doing that if that is a problem?

 

I would SO appreciate any help from you all (whom I consider gods of php)

 

Schmodi

Link to comment
Share on other sites

It says "Go to phpmyAdmin and select your new MySQL database adn load the sql file: SECv2_2MS2GV\MySQL Changes\NEW INSTALL\oscMS2SECGV_v2_2.sql file"

 

1. Exactly how do I do this? I can get to phpmyAdmin and get to my empty database file and then I don't know what to do.

 

You have set up your database on the server and it has a name.

1) Log in to phpmyAdmin

2) Click on your database "name"

3)Click the SQL tab at the top

4)Use the "Browse" utility to and give the location of the .sql file.

5) Hit "Go" and you are done.

 

This process has been working for me. Give it a shot. I just learned to do this on these contributions, but when I did the first install my tech at web hosting did it for me. If it will not work for you it is no problem since your database should be empty and you can start over.

Link to comment
Share on other sites

Ok.. I'm stumped.

 

I have the following error in admin:

 

1062 - Duplicate entry 'af59b9f5e92ce4c6dd0f138e0142180d' for key 1

 

insert into sessions values ('af59b9f5e92ce4c6dd0f138e0142180d?action=view', '1070786249', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";')

 

[TEP STOP]

 

 

Warning:  Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

I have no idea what this means and I've looked over the mySQL data and I can't find what it is saying is duplicated.

 

Help?

 

Khim~

Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup :-)

Link to comment
Share on other sites

Blah:(

 

The error should have posted as:

 

Paypal IPN

 

1146 - Table 'tubbytab_osc1.TABLE_PAYPALIPN_TXN' doesn't exist

 

select count(*) as total? from TABLE_PAYPALIPN_TXN

 

[TEP STOP]

 

1062 - Duplicate entry 'af59b9f5e92ce4c6dd0f138e0142180d' for key 1

 

insert into sessions values ('af59b9f5e92ce4c6dd0f138e0142180d?action=view?action=view?action=view?action=view?action=view', '1070788735', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";')

 

[TEP STOP]

 

 

Warning:? Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

1. Yes: I ran the sql file in phpmyadmin

2. Yes: Curl is enabled

3. Yes: I'm in test mode

4. No: I don't have a clue what I'm doing.

 

Khim~

Edited by inetchoices

Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup :-)

Link to comment
Share on other sites

Anybody had the problem of all IPN's coming back as INVALID? I also have the famous problem of the customer's cart not emptying after using IPN. Today I updated from v.97 to v0.981 hoping to solve these problems, but I got a new one. The transactions could not be deleted in admin for IPN, but I solved that by going back to the 0.97 version of papalipn_txn.php

Link to comment
Share on other sites

  • 3 weeks later...

I installed this on MS1 - it works fine. It is a great mod and to be recommended.

 

One minor error was the (int) in:

 

tep_db_query("delete from " . TABLE_PAYPALIPN_TXN . " where txn_id = '" . (int)$paypalipn_txn_id . "'");

 

 

in admin/paypalipn_txt.php. $paypalipn_txn_id is alphanumeric so the (int) should be deleted.

 

Plus I also added 'Refunded' to the list of response options.

 

I also set the mailto in paypal_notify.php back to the original and just made the default sendto address as option 1 to retain the address formating. ie.

 

$email_order .= "\n" . EMAIL_TEXT_PAYPAL_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($notify_customer_id, '1', 0, '', "\n") . "\n\n";

 

EMAIL_TEXT_PAYPAL_ADDRESS just says ' Customer Address'. It is not a problem to me that customers may have different billing and delivery addresses as this is just the email confirmation. They can always check these details in their Account Order History.

 

So, everything works fine in test and on real transations except for a refund.

 

For a Refund, the PayPal response processes the order again - even though in tests this seems impossible - and the status of the order is actually updated to Refunded.

 

My conclusion is that the PayPal response is using a cached version of paypal_notify.php or actioning the order on the first pass using variables stored with the Cid before it updates the order status in MySQL.

 

Has anyone come across this problem?

Ian-san

Flawlessnet

Link to comment
Share on other sites

Ok I have answered my own question. PayPal sends two responses for a Refund:

 

The first:

payment_status = Completed

txn_type = reversal

 

The second:

payment_status = Refunded

txn_type = web_accept

 

See here: http://www.paypaldev.org/topic.asp?TOPIC_ID=4394

 

so to stop the re-processing of the order, you need to add:

 

&& ($txn_type != 'reversal')

 

to the if in paypal_notify.php. I have combined it all together like this:

 

if ( ($notify_customer_id > '0') && ($response_verified == '1') && ($payment_status == 'Completed') && ($txn_type != 'reversal') ) {

 

However, you will not see txn_type = reversal in the database as this is instantly replaced by the second PayPal response which will show txn_type = web_accept.

Ian-san

Flawlessnet

Link to comment
Share on other sites

Hi,

 

I only have a problem with paypal IPN.

 

In the checkout_success.php appears 2 variables with no text defined:

 

PAYPAL_HEADING_TITLE_OK

 

PAYPAL_TEXT_SUCCESS_OK

 

 

Where can I define this variables?

 

 

Best Regards, Sorry for my english.

Link to comment
Share on other sites

The problem I've been having lately is if someone pays via Paypal IPN, and then I cancel the order. Later the order is checked again and it is marked as paid. I ended up deleting the order so I didn't ship it out mistakenly (already did it a few times). Now I am getting 'Order Status' emails that are blank. I think they are from the deleted orders.

Link to comment
Share on other sites

My version is non-standard but I think the mod should be as follows:

 

Replace:

 

if ($response_verified==1) {

if (strtolower($receiver_email)==strtolower(MODULE_PAYMENT_PAYPALIPN_ID) || strtolower($business)==strtolower(MODULE_PAYMENT_PAYPALIPN_ID)) {

if ($payment_status=='Completed') {

 

 

with:

 

$notify_customer_id = $order->customer['id'];

 

if ( ($notify_customer_id > '0') && ($response_verified == '1') && ($payment_status == 'Completed') && ($txn_type != 'reversal') ) {

if (strtolower($receiver_email)==strtolower(MODULE_PAYMENT_PAYPALIPN_ID) || strtolower($business)==strtolower(MODULE_PAYMENT_PAYPALIPN_ID)) {

 

 

and replace:

 

};

 

};

 

};

?>

 

with

 

};

 

};

?>

 

 

The check on the customer_id is not strictly required but maybe adds another layer of protection.

Ian-san

Flawlessnet

Link to comment
Share on other sites

I have installed this mod and did the following in the admin>>modules>>payment option for paypalipn

 

Use cURL - True

 

Allowed Currencies - USD,EUR,GBP

 

Default Currency - USD

 

Test Mode - False

 

Set Order Status - default

 

I added my notification url in paypal administration too.

 

I have added this option on site. Now when i get orders through paypal, the status becomes 'Paypal processing'. Even if the payment is made, the status remains 'paypal processing'. I m sorry but i just dont know how to make this work. What should i do now after i see any order with 'paypal processing' status. When i check my log, i find that paypal's bot visits my paypal_notify.php file but there is no update in the status.

 

I m sorry but i dont know what to do after installing this mod.

 

Any help would be greatly appreciated. Thanks in advance

 

Warm Regards,

Jack

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 5 months later...

I installed and tested this contrib and it appears to work just fine. I am a bit disappointed by its performance though. It seems to only update status when a payment is complete. It would be nice if status was updated when a payment is pending or denied.

 

This contrib only scratches the surface of PayPal IPN. Does anyone know if any of the other PayPal IPN contribs do a better job at handling notifications?

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I have this mod installed and it mostly seems to work but some sales stay on PayPal Pending. When I edit the order, paypal shows as nothing in the cart but below that nit, I can see the customers cart.

 

Anyone know what's wrong?

 

Thanks in advance,

 

Jude

Link to comment
Share on other sites

  • 3 weeks later...

I've completed the installation as described in the install.txt but I get no indication within oscommerce that the module has been installed.

 

Using osc file manager I cannot see the files, although using a separate file manager I can see them fine.

 

The module does not show up in the modules/payments.

 

I've checked and the database table exists and the insert script has run. I installed the module using the overwriteandrun option.

 

Thanks for your help in advance.

 

Richard

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