Jump to content
Sign in to follow this  
devosc

PayPal_Shopping_Cart_IPN

Recommended Posts

Question...I've got a client that's using this contribution.

 

He had a customer buy something, and everything went through just fine....paid in paypal and recorded in the db.

 

Then, there is another order for like $450, but all the details are missing and the payment was never made through paypal.

 

So my question is this....why would the order amount be recorded in the ipn tables if the payment was never made?

 

Thanks


Chris Sullivan

Share this post


Link to post
Share on other sites

I have a problem, when I try to delete a paypal order, it goes to a page that says:

 

1146 - Table 'pcmallu_shop.TABLE_PAYPAL_IPN' doesn't exist

delete from TABLE_PAYPAL_IPN where paypal_ipn_id = '0'

[TEP STOP]

 

So I looked at the PaypalIPN section of my admin panel and under transactions there are 2 transactions that have no txn id, the amount is 0.0000, their is no result and there is no date. So I try to delete these also, but it doesn't delete. Anyone have any ideas? My site is http://compshop4u.com

 

Thank you.

Share this post


Link to post
Share on other sites
1146 - Table 'pcmallu_shop.TABLE_PAYPAL_IPN' doesn't exist

 

delete from TABLE_PAYPAL_IPN where paypal_ipn_id = '0'

 

[TEP STOP]

 

This means that you don't have the table defined in your includes/database_tables.php file

 

-HTH


Chris Sullivan

Share this post


Link to post
Share on other sites

But i do have it there, thats what is confusing me...here is my code at the bottom of it:

 

[/code]

 

//begin PayPal_Shopping_Cart_IPN

define(TABLE_PAYPAL_IPN,'paypal_ipn');

define(TABLE_PAYPAL_IPN_ORDERS,'paypal_ipn_orders');

define(TABLE_PAYPAL_IPN_ORDERS_MEMO,'paypal_ipn_orders_memo');

define(TABLE_PAYPAL_IPN_TXN_TYPE,'paypal_ipn_txn_type');

define(TABLE_PAYPAL_IPN_REASON_CODE,'paypal_ipn_reason_code');

define(TABLE_PAYPAL_IPN_PAYMENT_TYPE,'paypal_ipn_payment_type');

define(TABLE_PAYPAL_IPN_PAYMENT_STATUS,'paypal_ipn_payment_status');

define(TABLE_PAYPAL_IPN_PAYMENT_PENDING_REASON,'paypal_ipn_pending_reason');

define(TABLE_PAYPAL_IPN_MC_CURRENCY,'paypal_ipn_mc_currency');

define(TABLE_PAYPAL_IPN_PAYMENT_ADDRESS_STATUS,'paypal_ipn_address_status');

//end PayPal_Shopping_Cart_IPN

?>




			
		

Share this post


Link to post
Share on other sites

Will this version 1.7 handle "eCheck" notification which is typically sent after about 3 ~ 4 days later?

 

I know the 1.5a does not work on "eCheck". You will get a blank order when the notification is received.

Share this post


Link to post
Share on other sites
craig,

QUOTE?

The configured email_receiver is: ######@sounds-alarming.co.uk

The configured business ID is ######@fonefit.com

 

in your case both these email addrs should be '######@fonefit.com' in osC admin->modules->payment->paypal.

 

OK did that but now the message body says :

COULD NOT PROCESS: You have received a payment of 53.38 GBP

 

????

Sorry to bump but I'm still getting this confusing email from IPN.

 

Can anyone help?

Share this post


Link to post
Share on other sites

Craig,

 

You should try and upgrade...

 

in catalog/ipn.php look for

//check that payment_amount/payment_currency are correct
//if ($ipn_cart->valid_payment($ipn,$cart,$currency) ) { //needs work
$description = "This payment was sent by customer {$ipn->key['first_name']} {$ipn->key['last_name']} via the osCommerce / PayPal Shopping Cart";
if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) $ipn->send_email('cart',"You have received a payment of ".number_format($ipn->key['mc_gross'],2)." ".$ipn->key['mc_currency']."\r\n\r\n$description\r\n\r\n");
unset($description);
$ipn->insert_ipn_txn();
$ipn_cart->process_transaction($order,$language,$ipn->get_paypal_ipn_id());
//} else {
//if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) $ipn->send_email('cart',"COULD NOT PROCESS: You have received a payment of ".number_format($ipn->key['mc_gross'],2)." ".$ipn->key['mc_currency']."\r\n\r\n");
//}

In your one the 'if' statment is probably not commented out, make it so that the code looks like the above (i.e. there should are few comments // needed further below as shown above).


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

Share this post


Link to post
Share on other sites

Hi,

 

I can't get this working either. When a customer makes a purchase, they are passed to PayPal OK and the basket contents looks OK. They complete the transaction and I receice an email from PayPal to say they have paid. I then get and email from my web site saying 'An unknown transaction () occurred'. The original order is deleted and there is nothing in the IPN Notifications.

 

I have configured IPN on the PayPal web site to be ON but with no URL. I have also configured the AutoReturn to be ON with a return address of mywebsite/shop/checkout_process.php

 

The site does not use SSL, 'Force Cookie Use' is FALSE and 'Recreate Session' is TRUE. I installed over a clean 2.2MS2 with PayPal IPN 1.7

 

Cheers for any help

 

James

 

P.S. This Contribution probably warrants it's own forum now. Do we not think?

Edited by spib

Share this post


Link to post
Share on other sites
But i do have it there, thats what is confusing me...here is my code at the bottom of it:

 

[/code]

 

//begin PayPal_Shopping_Cart_IPN

define(TABLE_PAYPAL_IPN,'paypal_ipn');

define(TABLE_PAYPAL_IPN_ORDERS,'paypal_ipn_orders');

define(TABLE_PAYPAL_IPN_ORDERS_MEMO,'paypal_ipn_orders_memo');

define(TABLE_PAYPAL_IPN_TXN_TYPE,'paypal_ipn_txn_type');

define(TABLE_PAYPAL_IPN_REASON_CODE,'paypal_ipn_reason_code');

define(TABLE_PAYPAL_IPN_PAYMENT_TYPE,'paypal_ipn_payment_type');

define(TABLE_PAYPAL_IPN_PAYMENT_STATUS,'paypal_ipn_payment_status');

define(TABLE_PAYPAL_IPN_PAYMENT_PENDING_REASON,'paypal_ipn_pending_reason');

define(TABLE_PAYPAL_IPN_MC_CURRENCY,'paypal_ipn_mc_currency');

define(TABLE_PAYPAL_IPN_PAYMENT_ADDRESS_STATUS,'paypal_ipn_address_status');

//end PayPal_Shopping_Cart_IPN

?>

 [/quote]
Use this instead:

[code]//begin PayPal_Shopping_Cart_IPN
 define('TABLE_PAYPAL_IPN', 'paypal_ipn');
 define('TABLE_PAYPAL_IPN_ORDERS', 'paypal_ipn_orders');
 define('TABLE_PAYPAL_IPN_ORDERS_MEMO', 'paypal_ipn_orders_memo');
 define('TABLE_PAYPAL_IPN_TXN_TYPE', 'paypal_ipn_txn_type');
 define('TABLE_PAYPAL_IPN_REASON_CODE', 'paypal_ipn_reason_code');
 define('TABLE_PAYPAL_IPN_PAYMENT_TYPE', 'paypal_ipn_payment_type');
 define('TABLE_PAYPAL_IPN_PAYMENT_STATUS', 'paypal_ipn_payment_status');
 define('TABLE_PAYPAL_IPN_PAYMENT_PENDING_REASON', 'paypal_ipn_pending_reason');
 define('TABLE_PAYPAL_IPN_MC_CURRENCY', 'paypal_ipn_mc_currency');
 define('TABLE_PAYPAL_IPN_PAYMENT_ADDRESS_STATUS', 'paypal_ipn_address_status');
//end PayPal_Shopping_Cart_IPN
?>


Chris Sullivan

Share this post


Link to post
Share on other sites

Chris, thanks for that, I hadn't noticed...

 

James, did you override the sessions stuff in Application Top as suggested in the link in the install docs?


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

Share this post


Link to post
Share on other sites
James, did you override the sessions stuff in Application Top as suggested in the link in the install docs?

 

Thanks for the reply :)

 

I hadn't done this but I just tried it and it seems to have made no difference. Is there anything else I can check?

Share this post


Link to post
Share on other sites

oops it seems I posted this as a new topic 2 Days.. no wonder I didn't get any answers :blink:

 

 

Hi

I have added this paypal contribution and it seems to work fine...appart from with the download controller (Linda Mcgraths Contribution)...

My problem is when Paypal ipn completes the transaction and returns to my store the download is not available.. just a note stating "Waiting for confirmation of payment"

 

Can anyone help with this???

 

The download works ok with Worldpay...so its seems I am missing something with Paypal

 

Cheers Malc

Share this post


Link to post
Share on other sites

James. sorry its been awhile, you didn't need to do that stuff if your only using session recreate. The only thing I can suggest at this time is to try it out without the Auto-Return feature first.

 

Malcolm, I haven't looked thoroughly into the DC before, maybe it is something to do with the status of an order...


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

Share this post


Link to post
Share on other sites

Thanks for the reply Greg.

 

I have tried without AutoReturn, no good. What happens now is that when the transaction is complete, PayPal returns me to http://mysite.com/catalog/checkout_process.php but the page fails to load.

 

Also, if I call catalog/checkout_process.php or catalog/ipn.php directly they will not load.

 

Does this sound familiar?

Share this post


Link to post
Share on other sites

I have just installed the contrib on a site, and I was wondering. The readme says this: "Once you have completed a PayPal payment go to osC admin and look under

'Customers' for the PayPal IPN link...."

 

Does this PayPal IPN Link appear only after a transaction has been completed, or should I see some evidence of a link before? Right now, the module seems to have installed OK, but I see no link under "Customer" in the osC admin.

 

Thanks.

Share this post


Link to post
Share on other sites

James, if you try to load checkout_process.php directly then you should be automactically redirected to checkout_payment.php, ipn.php would just show a blank page, do you get any debug emails? You could try setting it into test mode, use the sample ipn.html form to post an IPN, you will have to edit the html form action to point correctly to your catalog/ipn.php page, a dummy/blank should then be generated, it's been awhile since using the test.html so not sure if it will work with current version of this contrib, but it should at least generate some debug emails for you to examine (set debug level to 2 in the admin first).

 

Zorglub, if you have copied over all the files correctly then yes you should at least see a link directly under the orders link in admin->customers. The file that specifies these links for that particular box is admin/includes/boxes/customers.php (or something similar).


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

Share this post


Link to post
Share on other sites

Greg,

 

If I open checkout_process.php when I'm not logged it, it redirects me to the login page. If I open checkout_process.php when I'm logged in and have made a purchase (my session has been retained) it loads a blank page.

 

I'm wondering if the ipn->authenticate() code is failing because it looks like it is trying to redirect when I load checkout_process.php?

 

Debug emails are sent but I receive the same one every few minutes. Could this be PayPal trying to post back to my site?

 

Here's an example debug email (email addresses have been removed)

 

------------------------------------------------------
PayPal ORIGINAL POST
------------------------------------------------------
txn_type=cart
payment_date=10:01:18 Mar 23, 2004 PST
last_name=Spibey
payment_gross=
mc_currency=GBP
business=my_store_email
payment_type=instant
num_cart_items=1
payer_status=verified
verify_sign=Aql6p78HtWqe5cO8JPH1Z66iIUTyAp-JAB.80ARUdydRuHeT6eigarfC
payer_email=my_client_email
tax=0.00
txn_id=8VK625750N178611X
first_name=James
receiver_email=my_store_email
payer_id=EERK6KN4JY6FY
receiver_id=VZBZ4D7J6T3UW
payment_status=Completed
payment_fee=
mc_fee=0.01
mc_gross=0.01
item_name1=Die Hard With A Vengeance
custom=9ddd21bfb8b1cab0532ae5ecd47c1f0a
item_number1=DVD-DHWV
notify_version=1.6
quantity1=1
tax1=0.00


------------------------------------------------------
PayPal Reconstructed Post
------------------------------------------------------
cmd=_notify-validate
txn_type=cart
payment_date=10%3A01%3A18+Mar+23%2C+2004+PST
last_name=Spibey
payment_gross=
mc_currency=GBP
business=my_store_email
payment_type=instant
num_cart_items=1
payer_status=verified
verify_sign=Aql6p78HtWqe5cO8JPH1Z66iIUTyAp-JAB.80ARUdydRuHeT6eigarfC
payer_email=my_client_email
tax=0.00
txn_id=8VK625750N178611X
first_name=James
receiver_email=my_store_email
payer_id=EERK6KN4JY6FY
receiver_id=VZBZ4D7J6T3UW
payment_status=Completed
payment_fee=
mc_fee=0.01
mc_gross=0.01
item_name1=Die+Hard+With+A+Vengeance
custom=9ddd21bfb8b1cab0532ae5ecd47c1f0a
item_number1=DVD-DHWV
notify_version=1.6
quantity1=1
tax1=0.00

Share this post


Link to post
Share on other sites

Greg,

 

I noticed I keep getting debug emails from my shop even though I stopped testing with it yesterday. Looking at the emails, PayPal is trying to IPN me with transactions from the 22nd March (when I had IPN/AutoReturn switched on).

 

Any more thoughts on what might be wrong? If I were starting from a fresh install what configuration should I be using for sessions and within PayPal?

 

Cheers

Share this post


Link to post
Share on other sites

Hi James,

 

Someone else reported a similar occurance of receiving seemedly persistent IPNs or rather debug emails etc, I never heard anymore on it. The only thing I could suggest back then was to check the server logs and see how/when etc they are being made. If I can recall, PayPal will try for about 4 days in order to send an ipn, are all these IPNs verified?

 

With the auto return when the customer is returned to the site the order is not created but rather it is assumed that the IPN has bee received in the meantime. Whereas if the customer click the continue button then they return with the IPN info which can then verified upon their return.

 

Sessions settings are up to you really, depends on your exact needs, the how-to-ovrride just overrides these settings in order for the private IPN to work, contrib was designed on a default install.

 

Dunno, somewhat stumped here, all I can say right now is to try to match/verify the debug emails with the server logs (PayPal posts). I assume PayPal is not sending you a payment notification for each of these occurrances, if they are then they would all be valid payments etc....

 

Note if you have multiple sites etc, and have the url to the ipn.php file configured in your PayPal account then any account transaction will cause an IPN to be sent to ipn.php, even if it is unrelated.

 

I had asked someone at PayPal about them combing their auto-return feature so that a verification could be made upon a customer's return, e.g they bring the IPN info with them, but haven't heard anything back from PayPal.


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

Share this post


Link to post
Share on other sites

Hi Greg,

 

Thanks for the reply. This is a bit wierd. I'm getting debug emails every 30 mins or so. However, when I check my server logs, neither ipn.php or checkout_process.php have been accessed today.

 

When I try and access these two files directly from my browser, the checkout_process.php file 302 redirects to login.php but the ipn.php file doesn't display and more worryingly, isn't listed in my server log file.

 

Greg, would it be useful if you take a look at my site? It is only a test site so you can't break anything.

Share this post


Link to post
Share on other sites

Greg, forget all that.

 

It suddenly started working some time today. I checked my email and there were two ipn payments processed.

 

It is so wierd because I haven't even touched my server since this morning. The only thing I can think of is that something was wrong with the server I'm hosted on and they've since fixed it.

 

Anyway, thanks for all your help. Fantastic contribution!

Share this post


Link to post
Share on other sites
I had asked someone at PayPal about them combing their auto-return feature so that a verification could be made upon a customer's return, e.g they bring the IPN info with them, but haven't heard anything back from PayPal.

We strongly advise relying exclusively on the IPN for payment information if possible. This is by far the most reliable means for receiving the payment details.


Patrick Breitenbach

Share this post


Link to post
Share on other sites

Greg,

 

With the auto return when the customer is returned to the site the order is not created but rather it is assumed that the IPN has bee received in the meantime. Whereas if the customer click the continue button then they return with the IPN info which can then verified upon their return.

 

FYI, the version that I have modified for your review creates the order after the user confirms the order, and relies exclusively on IPN to move the order from pending to paid. If this scenario, auto-return works perfectly and makes no assumptions about WHEN the IPN is received. Assuming the IPN is received prior to the user returning with auto-return is creating a race condition that is outside of your control.

Share this post


Link to post
Share on other sites

Hi Anthony,

 

Yeah I know, but in the initial development stage PayPal's Auto-Return feature did not exist.

This is why I asked PayPal about combining the Auto-Return feature with the RM 2 method, actually I suggested that in the RM 2 method there is surplus info that the customer does not need to know / bring back with them to the site, this being the storeowners PayPal account details. The storeowners website ipn script could append this information to the transacton details and post it back to PayPal for them to authenticate in their usual manner.

What the significant difrence is between receiving the IPN info via the customer or directly from PayPal is not clear, both currently contain the same information, both are processed to in the same manner by PayPal, both is openly available to be posted by the public, so why by far the most reliable method is to soley rely on the independent PayPal IPN is somewhat puzzling, also PayPal do not offer any suggestions about protecting access to the ipn.php script, so anyone can post to it just in the same way that a customer could post themselves back to checkout_process.php with or without the info returned in the RM 2 method. It should not be difficult for PayPal to allow a combined methodology to be available to allow the store owner to have use of both the RM 2 method and the auto-return feature, even if they don't recommend RM 2. It works both ways in a customer client relationship.


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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×