Jump to content

Paypal IPN Setup


Guest
 Share

Recommended Posts

Okay, I've found little bits of info, so I want to start a thread that explains all the details regarding paypal IPN. At paypal there are two feilds that need t be set. #1 is the URL for paypal IPN. The second is the return URL that will send the user back to the cart to display a confirmation page of some sorts. Also reading, using standard mode, the orders are marked as Pending, but using IPN it should mark them as completed.

Digging around, I believe the IPN url should be store.com/modules/gateway/PayPal/ipn.php Testing all of this, their info apears to be send to paypal correctly. However, shipping is listed as zero and the total amount includes the shipping. While this works, this will likely confuse a customer at some point. A side note regarding shipping that I didn't catch imediately is how/when the shipping costs are added. On the first few test orders I created, I wanted to use the default shipping method that came up which was UPS overnight. The price of shipping doesn't get added unless you choose the pull down menu and select one, be it what it already was or something different. If you just leave it default and go through to checkout, shipping never gets added unless you specifically choose a shipping meathod. The defalt shipping method does not get added.

The main problem I have is at the end of the transaction when it returns you back to your store. From searching it looks like the return URL should be store.com/confirmed.php but when that is used, I get a SQL error

MySQL Error Occured

1054: Unknown column 'cart_order_id' in 'where clause'

QUERY = SELECT status FROM CubeCart_Modules WHERE cart_order_id = '050701-222307-3053'

It's clear it needs to have the order id passed back to it, but how do I do that?

So here are the few things I need resolved.

What is the IPN URL?

What is the Paypal return URL?

IPN should be sending the shipping amount seperately instead of added to the total.

The default shipping method should be added to the total without user intervention.

Link to comment
Share on other sites

Digging a bit deeper at the DB structure. There isn't a field in the 'Modules' table called 'cart_order_id'. It's got the order id number there, but it looks like the query is not constructed properly. I hope one of the devs has some info :huh:

Link to comment
Share on other sites

Hi Trail Hunter, Sorry I cant help you as I have been banging my head on the monitor to trying to figure out paypal, just thought I would let you know you are not alone. gws

Link to comment
Share on other sites

  • 4 weeks later...
Guest thunderracer

I thought this was fixed ime using the latest version and still no go. Please can someone, in charge atleast comment on this. so we dont feel like were in the battle alone.

MySQL Error Occured

1054: Unknown column 'cart_order_id' in 'where clause'

QUERY = SELECT status FROM CubeCart_Modules WHERE cart_order_id = '050701-222307-3053'

Link to comment
Share on other sites

Guest thunderracer

The PDF manual isn't any help as the problems seems to be with CC and I'm not the only one having it. I've spent many hours scouring the forums with no answer. I'm not afraid to do the work I would just like a answer on what the problem is.

I've reinstalled 5 times now downloading a fresh file each time. I've followed the instructions to the letter. Everything else is working. I went with CC because of looks and ease of use but if I cant get paypal IPN to work I will have to go with either OS or Zen. I really don't want to do that but finically if I'm going to put this amount of time into a program do I really want to pay for it. I'm looking for a answer is all I'm not asking anybody to do the work just an answer. the error ime getting is below copied exactly as its shown.

MySQL Error Occured

1146: Table 'dbXXXXXXXX.CubeCart_Modules' doesn't exist

QUERY = SELECT status FROM CubeCart_Modules WHERE cart_order_id = '050802-085344-5632'

Link to comment
Share on other sites

  • 3 weeks later...

well Brooky seems ya got something seriously hosed here as IM using CC 3.0.2 and when I set IPN in CC admin to the proper file and turn on IPN and set the URL at paypal then set the auto return URL at paypal to goto the stores confirmed.php I get this error message:

Error: No payment gateway variable is set!

so I set the return URL to https://www.usahaircare.com/modules/gateway...l/confirmed.php

found out there is no confirmed.php for paypal

So I tried using the authorize confirmed.php and moddified it for use with paypal but again I got errors this a 403 forbidden

even after setting the ifset to amount and incvoice fromt he authorize x_amoun and x_invoice

still no joy

so basicly if you use Paypal as a payment option and want to use IPN you are screwed

if you set paypal to standard all works fine...

so whats the deal?

where should we set the auto return URL at paypal to?

so customers get returned to the store properly? hmmm?

how do we use paypal with IPN and a return URL?

Kinetic aka Mr Eyecandy

Link to comment
Share on other sites

Guest netgroup

I thought this was fixed ime using the latest version and still no go. Please can someone, in charge atleast comment on this. so we dont feel like were in the battle alone.

MySQL Error Occured

1054: Unknown column 'cart_order_id' in 'where clause'

QUERY = SELECT status FROM CubeCart_Modules WHERE cart_order_id = '050701-222307-3053'

I have IPN working....and got it first time.

The error you are seeing happened to me when I had switched the Paypal test setting to NO in the paypal gateways setup. Have you got the paypal gateways 'test' setup set to yes while you are doing this.

I've posted in another thread about how I went about setting up IPN.

http://www.cubecart.com/site/forums/index....showtopic=10035

Hope this helps in some way.

Link to comment
Share on other sites

Guest netgroup

I have the test setting set to NO

and it wouldnt work

Forgive me, but if you have the test setting set to NO - why would you expect IPN to work if you haven't confirmed it is working in a test environment yet?

Are you actually using your paypal developers account to test this? If not, you need to be:

1) set up as a paypal developer

2) set your cubecart to IPN mode and also enable test mode to YES

If you get it working with the above, simply set your test mode to NO and ensure that you have selected IPN mode.

(This all assumes that you have IPN mode enabled in your paypal profile, with the correct return url specified).

Link to comment
Share on other sites

Umm no read my post Im testing paypal live not a test environment

with a product worth 10 cents

and using my personal paypal acct to pay the store

so my setting of NO is proper

Im not testing in a test or sandbox environment but in a live environment

Link to comment
Share on other sites

I have IPN working....and got it first time.

Tell me netgroup - have you got a "live" PayPal setup that actually works?

If you do maybe you can share your PayPal config. with us.

In PayPal's 'Website Payment Preferences' do you have AutoReturn set On or Off?

What is the Return URL that works for you?

Does Payment Data Transfer need to be on or off or does it make a difference?

Link to comment
Share on other sites

Guest netgroup

Hi,

Yes I have it working live, but our shopping cart doesn't go 'live' to the public until the 1st Sept.

Also, I believe that paypal specifies that your product that you are using to test must be worth at least $1 (not 10 cents).

Once I have some time I will give you exactly the settings I have....but I would strongly advise that you sign up for the sandbox test environment and test your paypal settings from there.....I did...and it worked first time, simply by following their instructions and also using the return url that was generated in the cubecart mod program for paypal.

I will come back to you....I promise....when I have more time.....

Its the simplest thing I've ever done.....yet reading the posts on this site I can see that some people are really struggling with it.

netgroup

Link to comment
Share on other sites

Guest netgroup

OK.....two areas you need configured.

First....the paypal module in cubecart.

Configuration Settings Status: Enabled

Description: Pay Via PayPal

Email Address: [email protected]

Method: IPN

IPN URL:

http://www.mysite.com/store/modules/gateway/PayPal/ipn.php

Default: Yes

Test mode?

(Requires a PayPal Developer Account) No

(Note test mode is set to No only AFTER I had opened a paypal developer account and tested it with this setting set to YES)

=========================

Then go to paypal.

Go to your profile: On right hand side go to the IPN activation link.

Activate IPN and input the url given on the paypal configuration page in your cubecart as above.

http://www.mysite.com/store/modules/gateway/PayPal/ipn.php

Note: You may find that there are two //'s after the store. This is an error which will require you to remove one of the forward slashes.

hope this helps.

netgroup

Link to comment
Share on other sites

Guest markyvuk

This is fine except it doesn't then return the customer to your site. The customer is stuck in PayPal and has no way to get back to your site unless they re-enter via the index page!

The correct way to use PayPal IPN is to also enter a Website Auto Return URL. This is found within your PayPal Profile settings -> Website Payment Preferences.

The option for auto return should be set to ON

The return URL should be set to a page which advises the customer that the payment has been completed. This page does not seem to have yet been created within the CubeCart system. The closest would be http://www.yoursite.com/confirmed.php BUT BE WARNED this does not work!

Anyone want to assist with this or should we all just wait for the NEXT buggy release?

Link to comment
Share on other sites

OK - close as I can figure it should work like this:

confirmed.php calls

'includes/session.inc.php' which attempts to pull gateway variable from the 'CubeCart_sessions' table in the db

confirmed.php also calls

'includes/content/confirmed.inc.php' which uses the gateway variable to determine the path to the correct 'transfer.inc.php' file to use.

'transfer.inc.php' checks the db table 'CubeCart_order_sum' for the order status and passes it back to 'includes/content/confirmed.inc.php' which generates the success/failure message.

Seems that session.inc.php is failing to pull the gateway variable from the database.

Link to comment
Share on other sites

Guest netgroup

This is fine except it doesn't then return the customer to your site. The customer is stuck in PayPal and has no way to get back to your site unless they re-enter via the index page!

The correct way to use PayPal IPN is to also enter a Website Auto Return URL. This is found within your PayPal Profile settings -> Website Payment Preferences.

The option for auto return should be set to ON

The return URL should be set to a page which advises the customer that the payment has been completed. This page does not seem to have yet been created within the CubeCart system. The closest would be http://www.yoursite.com/confirmed.php BUT BE WARNED this does not work!

Anyone want to assist with this or should we all just wait for the NEXT buggy release?

I'm sorry to disagree, but I've got the same 'buggy release' as you all and all I can say is that it works. Instead of looking at the software and blaming it, (now that you know it is working for 'at least me'), consider that something somewhere in your settings is wrong. Sorry if that's blunt, but I can only help people if you are prepared to accept that you may have to re-look at everything under YOUR control. I would love to see you all getting this working for you.

So:

All I can tell you is that the return url I have input in paypal is the one that is listed in my post above

http://www.mysite.com/store/modules/gateway/PayPal/ipn.php

(I'm certainly no expert but surely this IPN url only works in the background ie to confirm the order, raise emails and delete the stock - as far as I know it doesn't have any affect on what the customer sees in their browser......this part is up to you).

ie. If you want the customer to return to your site, you must tell paypal to return you to a page that you have created. I called mine www.mysite.com/paysuccess.html and yes I have auto-return switched to ON.

In the buying process, the customer confirms their order with paypal - they get a confirmation screen from paypal confirming their paypal payment and automatically within about 5-8 seconds they return to my paysuccess.html page, thanking them for their order.

I'm not a php programmer by any stretch of the imagination, but I simply followed the instructions in cubecart and paypal, created a developer test account (CERA), got it working and now we're ready to go live in a few days time....we've tested it thoroughly and are more than happy with cubecart and paypal's IPN.

CERA

I don't need to read your post, I know you are working in a live environment.

I can't see why you wouldn't simply set up a paypal sandbox test account if this is important to you. It takes 2 minutes and lets you work on your configuration and settings quickly and with ease.

I think many of you are complicating the issue by trying to figure out what php file does what. WHY? Simply give the IPN return url to paypal.....then sort out your own return page to say thanks for the order.

Hope this helps you all out in some small way.

Link to comment
Share on other sites

Guest markyvuk

Hold on there!

I also agree that the PayPal IPN gateway works, i.e. it processes the payment, reduces stock levels, etc but once the payment is complete, which uses background tasks, the customer is left stuck in PayPal rather than OUR shopping sites.

And also, if this software is a complete package why should WE have to create our own customer success page?

Many users of this package would not have the necessary skills or tools to carry out such a task and every other shopping system I have used in the past has included such a page as in integral part of the PayPal gateway.

Perhaps Mr Brooky would like to make a comment?

Link to comment
Share on other sites

Guest thunderracer

yes please comment on it. Or point us to a step by step guide. I cant find any documentation anware. Ime very frustrated. Time is short and because of the paypal thing ime no ware near ready to go. I would love to pay you for the script but if it isnt going to do what I need it to do then I will have to go with one of the crappy free ones. I know there Paypal IPN works but that is all they have going for them. So please let us know what we are doing wrong. Here is my config. bear in mind this is my test site.

paypal config

Instant Payment Notification Preferences

Instant Payment Notification (IPN) On

Instant Payment Notification (IPN) URL: http://s92911159.onlinehome.us/lasttry/mod.../PayPal/ipn.php

Website Payment Preferences

Auto Return: on

Return URL: http://s92911159.onlinehome.us/lasttry/confirmed.php(gets the order not successful try again page.

(ive also tried.) http://s92911159.onlinehome.us/lasttry/thankyou.html (gets trasferd to the page but thats all no email sent cubecart doesnt have a clue)

and http://s92911159.onlinehome.us/lasttry/mod.../PayPal/ipn.php (Blank page is shown email is sent but invintory is not subtracted intil manually marked as Processing)

Payment Data Transfer: ON

Block Non-encrypted Website Payment: OFF

PayPal Account Optional: ON

Contact Telephone: Off (PayPal recommends this option)

CUBECART CONFIG

Under paypal

Status: Enabled

Description: Pay with Paypal

Email Address: [email protected]

Method: IPN (Recommenend)

If IPN is selected you must login to PayPal and enable IPN.

IPN URL:

http://s92911159.onlinehome.us/lasttry/mod.../PayPal/ipn.php

Default: Yes

Test mode? Yes

(Requires a PayPal Developer Account)

The way I understand it Using IPN is suppose to automaticly descrease stock and mark it as Processing. Neither of wich has been happenning. or Am I understanding wrong?

Link to comment
Share on other sites

CERA

I don't need to read your post, I know you are working in a live environment.

I can't see why you wouldn't simply set up a paypal sandbox test account if this is important to you.  It takes 2 minutes and lets you work on your configuration and settings quickly and with ease.

I think many of you are complicating the issue by trying to figure out what php file does what.  WHY?  Simply give the IPN return url to paypal.....then sort out your own return page to say thanks for the order.

Hope this helps you all out in some small way.

Well in the first place - a successful test setup does not guarantee a successful live setup.

In the second place - a test setup does not return a buyer to the shop with a successful confirmation message.

Like markyvuk said

"I also agree that the PayPal IPN gateway works, i.e. it processes the payment, reduces stock levels, etc but once the payment is complete, which uses background tasks, the customer is left stuck in PayPal rather than OUR shopping sites."

Yes I could attempt to work out my own return page but Brooky has already provided one - confirmed.php - doesn't it make more sense to figure out why that one doesn't work?

I'm glad that you are happy with CubeCart's PayPal IPN.

Some of us are happy with what does work and not so happy with what doesn't work.

Link to comment
Share on other sites

Guest netgroup

Hi Cera,

You wrote:

Well in the first place - a successful test setup does not guarantee a successful live setup.

REPLY: Why?....surely thats the point of paypal providing the sandbox area.

You wrote: In the second place - a test setup does not return a buyer to the shop with a successful confirmation message.

REPLY: Correct....not automatically...what it does do is presents you with a confirmation button which you have to click (in test mode) to bring you back to your site....if you know this, its surely not an issue simply to click the button.

Also, if you know all of this, you must have been in paypal test mode at some point? or are you just going by what others are posting?

You wrote: Like markyvuk said

"I also agree that the PayPal IPN gateway works, i.e. it processes the payment, reduces stock levels, etc but once the payment is complete, which uses background tasks, the customer is left stuck in PayPal rather than OUR shopping sites."

REPLY: Not so....if you have the paypal setup stating that auto return is ON....your customers won't get stuck in paypal. It will forward them automatically.

You wrote: Yes I could attempt to work out my own return page but Brooky has already provided one - confirmed.php - doesn't it make more sense to figure out why that one doesn't work?

REPLY: Nope...if you are finding that something isn't working and someone gives you an alternative, why keep banging your head off a brick wall?

Confirmed.php works for me, so I don't think that is an issue with the script either, but I'd rather have the customised paysuccess page of my own so for all it takes to create a simply html page saying thank you, thats what I decided to go with.

You wrote: I'm glad that you are happy with CubeCart's PayPal IPN.

REPLY: I'm sorry (and I'm very aware) that from your position it looks like I'm being patronising because my cart is working, but I can assure you I'm not. I wanted to help and took time to try and provide you with my details.

You wrote: Some of us are happy with what does work and not so happy with what doesn't work.

REPLY: Maybe rephrasing that to 'some of us are happy with what does work and not so happy with what we can't get to work' would be more accurate.

Why do you keep saying the script is at fault when there are many people (and I'm probably the only one that I can see) that has come back here to let you know that it does work. Most of the others don't visit the forums simply cos they have it working and don't need support. I'm simply here to offer help to you.

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

 Share

×
×
  • Create New...