Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal_Shopping_Cart_IPN


devosc

Recommended Posts

My problems with the Credit Class Contrib seems to be resolved. I just change the cart method to 1.

 

Matt:

I think that you only need to add the changes for the Credit Class in checkout_process.php to catalog/ipn.php

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I finally got paypal working (not sure about ccgv but that will wait) but i had to click the button to be returned to my site for the order to show up. How do i set up Autoreturn and will this eliminate this step?

Link to comment
Share on other sites

Ok, I finally got paypal working (not sure about ccgv but that will wait) but i had to click the button to be returned to my site for the order to show up. How do i set up Autoreturn and will this eliminate this step?

I am having this same problem. If I set Autoreturn to 0 and disable it in my PayPal account, then the order gets added and everything works perfectly. But when I turn it on, the order is not added and I get no IPN notification.

 

What are my settings supposed to be in my PayPal account to get this to work properly? What address should I put as the autoreturn address? The address to my ipn.php file? PayPal does not permit me to leave it blank.

Link to comment
Share on other sites

Hallo togehter...

 

I only have a small question :rolleyes:

 

I've installed the contribution and it seems to work. But now I want to test.

Is there any way for making a test with paypal without paying paypal for the test.

Thanks Matthias

Link to comment
Share on other sites

Yes, buy somethinG for 0.01 Paypal will charge you -0.01 and you end up all square! Alternatively buy something and refund the cost. Paypal (unlike many other processors) will refund the fee!

Edited by radders
Link to comment
Share on other sites

Ok, I finally got paypal working (not sure about ccgv but that will wait) but i had to click the button to be returned to my site for the order to show up.  How do i set up Autoreturn and will this eliminate this step?

I am having this same problem. If I set Autoreturn to 0 and disable it in my PayPal account, then the order gets added and everything works perfectly. But when I turn it on, the order is not added and I get no IPN notification.

 

What are my settings supposed to be in my PayPal account to get this to work properly? What address should I put as the autoreturn address? The address to my ipn.php file? PayPal does not permit me to leave it blank.

Go to Paypal.....

Click "Merchant Tools"

Scroll down to the "Other PayPal Tools" section

Click on "Auto Return"

 

Select Auto Return = ON

Enter the autoreturn URL of your cart as follows :

http(s?)://yourdomain.com/catalog/checkout_process.php

Link to comment
Share on other sites

Ive been using this contrib for a while now but Im not convinced I have it set up correctly, could you help?

 

When I receive an order I get two emails, the first is from paypal with the details of the sale. The second is from my store with the subject line

'SoundsAlarming Online Store PayPal IPN: unkown email_receiver'
and this in the message body
The configured email_receiver is: [email protected]

The configured business ID is [email protected]

PayPal says

[email protected] , [email protected]

PayPal Transaction ID:0VC654NBV.....etc

 

Its the unkown email_receiver that im unsure about?

 

The order is processed in admin and everything else seems OK. What am I doing wrong?

 

Thanks, and sorry if this has been answered before but this thread is so long and a search revealed no usefull information.

Link to comment
Share on other sites

Hi,

 

I installed this and now under payment type "Paypal" doesn't show up? Where did i mess up?

 

From the admin panel this module is Enabled, but when i check out there is no paypal option at all.

 

Any help??

Link to comment
Share on other sites

Morning FOlks,

 

I have this contrib installed now and I am happy to see that even when the customer does not hit the final continue button in PayPal I am still recieveing an order request with all the products they ordered.

 

The one thing that is happening that i need some help with is that when they actually do hit the continue button I am recieving a duplicate order with the order number one higher then the original.

 

I know recieving two orders is better then not recieving it at all but hopefully someone can point me where I am going wrong with the install. I was under the impression that the contrib will notice the duplicate and not submit the second.

 

thanks.. muchly..

 

MIKEY

Edited by updmike
Link to comment
Share on other sites

Hello updmike

 

I have noticed this:

 

When setting up at www.paypal.com/profile/instant payment notification preferences I get one order mail if I set Instant Payment Notification (IPN) On and Instant Payment Notification (IPN) URL: None

 

If I set Instant Payment Notification (IPN) On and Instant Payment Notification (IPN) URL: myshop/ipn.php I get two mails.

 

That's the only difference - all other facilities auto return included are working as they should in both cases.

 

Sincerely

Cornelius

dog1.jpg Who let the dog out ?!!! Newer trust a smiling dog!
Link to comment
Share on other sites

craig,

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.

 

mikey, really this should not be happening, could you look at both orders and confirm whether both transaction id's are the same? If they are, maybe you could email me the debug emails, so that I could look to see why this might be occuring.

 

cornelius, if you got an email about an unknown post, it was me, trying to see whether you were in Test Mode, but it seems that you are not :)

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

Link to comment
Share on other sites

Argh!

 

Back again ... I have the same problem as before, I had this (IPN 1.7 with correct order entry into osAdmin) working:

 

 

To reiterate:

I have IPN 1.7, Ebay Auction Manager, Master Products, Eastpopulate, visitors 1.7a, uk-recorded-delivery, osC 2.2

Customer purchases an item from the store, then chooses to pay via Paypal IPN.

 

The customer is fine. But at the point where they click on 'Pay', the entry comes back in the osAdmin with no details for the purchase or the customer.

 

It registers an IPN, but linked to blank details.

 

The previous suggestion was that this is due to the fact that a customer_id of 0 is being referenced, which is accurate (no customers of id 0, so no details...) but I don't know where, or how to fix ...

 

 

Where MIGHT the problem be so I can check through all my saves? Would it be in order.asp? - I haven't changed that, so I dont know why it would be in there...

 

If someone could tell me at what point the Order information is entered into the Orders(?) table, I can track the problem down ... but at the moment I'm a little blind =)

 

 

 

TIA

Edited by veral
Link to comment
Share on other sites

...

 

I wonder if it might actually be something in the database itself.

 

I just went back and restored 5 previous versions of my website, the very first of which is dated BEFORE the last working Paypal IPN+order in my osAdmin.

 

Grrrr. I hate not knowing how the whole thing works ...

 

Soooo ... anyone know of any tables or changes in the DB itself that might cause the orders to be incorrectly referenced to customers_id 0?

 

 

Check/Money Order still work fine...

 

Rats.

Edited by veral
Link to comment
Share on other sites

Hi Veral,

 

If you view the source of the checkout_confirmation.php page check to see that the osCsid is being stored in the 'custom' value field.

 

Are you using the Auto-Return feature or are they still being prompted to click the PayPal continue button?

 

What currently happens is that when PayPal sends the IPN the custom field is extracted back into the session id and the session is restarted, hence the cart information is available including the customers_id. The order is then created via the code in catalog/ipn.php which is in that section (clearly marked) is exactly the same as the code found in catalog/checkout_process.php.

 

If they customer is Auto-Returned, currently, the cart is reset, so if they return prior to the IPN being processed this information is lost, hence customer_id=0.

 

If the return by clicking the PayPal continue button then they effectively return with the IPN information which is used to generate the order (view the source before clicking the PayPal continue button). So the real IPN sent by PayPal is (or rather should) be considered as a duplicate and hence ignored since the order has been already created.

 

Off topic - I would suggest that you download and use the Mozilla FireFird or now called FireFox browser, there are some extensions you can install for webdevelopment, such as http headers, this extension (or similar) will give you additional information about all the <form> fields on the page and their values, which saves hunting through the source code.

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

Link to comment
Share on other sites

Again, sorry about the spam, I wonder if this would help Greg :P

My paypal settings are:

 

Set Order Status=default

Sort order of display. = 0

Background Color = 0

Enable Store Logo = 0

Store logo = oscommerce.gif

PayPal Page Style Name

Include a note with payment = 0

Shopping Cart Method = 1

Enable PayPal Shipping Address = 0

Using PayPal Auto-Return = 1

Email Notifications = 1

Test Mode = 0

Notification Address = [email protected]

Return URL behavior = 2

 

I changed Email notifications from 2 to 1.

My cc card can't cope with any more tests, so I guess I go back to that tomorrow - I've also changed sessions back to non-file, removed file caching, and turned the cookies setting to off.

 

I'm wondering whether I should change Return URL behaviour to GET - so at least I can see what it's sending back? Am I making sense? :P

 

 

 

mysql> select orders_id, customers_id, paypal_ipn_id from orders;
+-----------+--------------+---------------+
| orders_id | customers_id | paypal_ipn_id |
+-----------+--------------+---------------+
|         1 |            2 |             0 |
|         2 |            2 |             1 |
|         3 |            2 |             2 |
|         4 |            2 |             3 |
|         5 |            2 |             4 |
|         6 |            2 |             5 |
|         7 |            2 |             6 |
|         8 |            2 |             7 |
|         9 |            2 |             0 |
|        10 |            4 |             0 |
|        11 |            2 |             8 |
|        12 |            2 |             9 |

All working up to this point.  Last txn... 

|        14 |            0 |            10 |
|        15 |            2 |             0 |
|        16 |            0 |            11 |
|        17 |            0 |            12 |
|        18 |            0 |            13 |
|        19 |            0 |            14 |
|        20 |            0 |            15 |
|        21 |            0 |            16 |
|        22 |            0 |            17 |
|        23 |            2 |             0 |
|        24 |            0 |            18 |
|        25 |            2 |             0 |
+-----------+--------------+---------------+

mysql> select customers_id, customers_firstname from customers;
+--------------+---------------------+
| customers_id | customers_firstname |
+--------------+---------------------+
|            2 | waidat              |
|            5 | Christian           |
|            4 | Tim                 |
|            6 | qwert               |
|            7 | Richard             |
+--------------+---------------------+

mysql> select orders_products_id, orders_id, products_id from orders_products;
+--------------------+-----------+-------------+
| orders_products_id | orders_id | products_id |
+--------------------+-----------+-------------+
|                  1 |         1 |          19 |
|                  2 |         2 |          19 |
|                  3 |         3 |          19 |
|                  4 |         4 |          29 |
|                  5 |         4 |          19 |
|                  6 |         5 |          29 |
|                  7 |         6 |          29 |
|                  8 |         6 |          28 |
|                  9 |         7 |        1454 |
|                 10 |         7 |        1453 |
|                 11 |         7 |        1452 |
|                 12 |         8 |        1454 |
|                 13 |         9 |        1452 |
|                 14 |        10 |         399 |
|                 15 |        11 |        1452 |
|                 16 |        11 |        1453 |
|                 17 |        12 |        1454 |
|                 18 |        12 |        1453 |
|                 22 |        23 |         397 |
|                 21 |        15 |        3548 |
|                 23 |        25 |        3548 |
+--------------------+-----------+-------------+

Link to comment
Share on other sites

Veral, I've haven't had time to think through the above, but you mentioed about cookies etc, did or have you implemted the workaround required for this in application_top.php, I mentioned a link in one of the download-contributon posts.

Edited by gregbaboolal

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

Link to comment
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

 

????

Link to comment
Share on other sites

Hi Greg,

 

To my astonishment, people came and bought items from us - and the paypal entries work. I can only assume that it was definitely something to do with the sessioning or caching - and I won't be able to check until my credit card resets tomorrow :P (Can only buy 10 items in one day)

 

All my settings remain the same, it's the osAdmin settings I've changed which aren't directly to do with IPN...

 

Gah. Panic over.... temporarily. But it _does_ explain the discrepancies I've been having in the past if it IS a session/cookie thing.

Link to comment
Share on other sites

My paypal was workjing but without autoreturn. I turne on autoreturn and got a payment via paypal but the ipn has no customer data and the order shows as check or money order.

Link to comment
Share on other sites

Receiving fatal error after payment made ...

 

 

Fatal error: Cannot redeclare class shipping in /home/mysite/public_html/store/includes/classes/shipping.php on line 13

 

The payment goes through paypal just fine, I get to their success screen, and when I get redirected back to my site I receive this error.

 

Any hints?

Link to comment
Share on other sites

Has anyone managed to get the Credit Class/Gift Voucher to work with IPN?

 

I have two issues:

 

1) When a user uses their voucher, it doesn't deduct from the 'Total' - it just says: Gift Voucher: (value) after the total amount in checkout_confirmation. I mean, it's working, but if I can't tell that I need to pay less, my customers won't either.

 

2) The ipn.php doesn't contain some of the lines which need to be changed in checkout_process.php... Could someone tell me which Paypal_IPN files I need to change to get the two contribs working together?

 

 

 

Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...