Post by Shopping2000 » Mon Jun 01, 2009 7:33 am

Hi! I installed OC 1.2.8 and patched the paypal.php because of the pmtaction problem (http://forum.opencart.com/viewtopic.php ... ion#p19502). "Bank Transfer" and "Paypal" are installed, enabled and configured.When I order something with "Bank Transfer" everything is fine, but when I order something with "Paypal" no Order is created and no Email is send to the customer (the paypal transaction seems to be fine - tested with developer.paypal.com ). I read that in older OC versions the order was created when the customer pressed the "Confirm Order" buttom. Now not anymore? Is it possible to activate this again? I read that in older OC Versions were an 'Check Out'/'Callback' (Paypal > Edit in the admin interface) option. I don't have this option with OC 1.2.8...

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Daniel » Mon Jun 01, 2009 6:48 pm

are you sure your server can accept paypal callbacks?

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Shopping2000 » Mon Jun 01, 2009 8:29 pm

I don't know... My homepage is on www.byethost.com

Is it still possible to use Paypal also without callback? In fact I don't need callbacks. When I see that the customer made a mistake I contact him/her...

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Shopping2000 » Wed Jun 03, 2009 3:56 am

Just now I installed a fresh installation of OpenCard 1.2.8 at http://www.byethost.com

1.) I switched off magic_quotes_gpc with an .htaccess file (content of the .htaccess file: "php_flag magic_quotes_gpc off")

2.) I installed, configured and enabled the "PayPal" and "PayPal Direct Checkout" Payment Moduls in the admin panel (both in testmode, both with my developer.paypal.com account data)

3.) I fixed the file catalog/controller/payment/paypal.php ('Authorization' and 'Sale' must be lower case)

4.) I made an order with "PayPal" payment. The whole shopping and payment process is fine, but the order-entry is NOT generated and NO email is sended out

5.) I made an order with "PayPal Direct Checkout". First issue: My test VISA Card at developer.paypal.com has an Exp Date of 5/2019 OpenCard allows 2018 maximum. Second issue when I try to click "Confirm Order" nothing happens.

Has somebody else the same problems with the byethost.com server? Any recommendations for another FREE hoster which supports OpenCart?

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Daniel » Wed Jun 03, 2009 5:32 am

I've noticed alot of stuff not working with free hosting. they normally include hidden tracking code that screws things up.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by tommix » Wed Jun 03, 2009 8:47 am

hello to my world -you're number 3 who has this problem :) but my server is good it's VPS not in some cheap-crappy USA server..

it creates orders, but don't show in admin-only in DB you can see them and need to assign order_id to be not 0, 1 = pending, 5= complete.

But in my case it worked until import..or until some unknown stuff happens.

Active Member

Posts

Joined
Mon Apr 20, 2009 5:21 am

Post by Shopping2000 » Wed Jun 03, 2009 7:39 pm

You're right. Also in my case all paypal orders are in the db. Also in my case all are set to order_status_id = 0. So when it is set to i.e. 1 by pressing the "Confirm Order" button would it work then? Would the confirmation email send out to me and my customer? Or is more code to change then?

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Qphoria » Wed Jun 03, 2009 10:09 pm

Paypal works well, but i can be a bit confusing. The idea is sound, but there is some confusion with the design.

The flow is like this:

1. You checkout
2. Choose Shipping
3. Choose Paypal
4. Land on Confirm page. This is where the "temp" order... or status 0 order is created.
5. Press confirm.
6. An ajax call is made to the order confirm function. This function changes the order status to the store's default status set in the settings page. (usually PENDING) It also sends an email out to the customer & admin, which is where the confusion starts.
7. Then it sends the customer to Paypal
8. Customer pays and an IPN is sent back to your store.
--- The IPN, if successful, will update the order to the final order status set in the paypal configuration (usually PROCESSING). It also sends out another email here for the updated status to the customer & admin. So now there are 2 emails sent.
--- The IPN, if not successful, will not update the order to the final status, but the order should exist in the admin panel in the original PENDING state so that you can follow up with the customer, or if you see you got the money in your paypal account, you can just force the order state to PROCESSING.

Pros:
- Order isn't lost if there is a problem at paypal
Cons:
- Requires javascript for the Ajax callback, but you need it for most of the store anyway
- Can lead to a lot of pending orders if the customer decided to just quit before paying
- Can be more leg work if IPN isn't working, as there is no additional update check when the store returns, so you can have a lot of pending orders that are paid for.

Some improvement ideas:
- Add support for client side return to update the order by changing the return url to use the same callback url as the ipn does. This will at least let you have a second chance to update orders on a server where IPN won't work.
- If using the above idea, you'd need to add a quick check to the callback function to ensure that the order isn't processed twice and send out 2 emails during the update function.
- For store owners, if the first 2 ideas above are in place, you can set your paypal account to "AutoReturn" and then when customers pay, they will be automatically returned back to your site after 5 secs.

Reasons IPN might not work:
- You are on a cheap/free server with poor features
- You are on a stupid server like GoDaddy who blocks more than they should in the name of security
- You are on a localhost/home server with no outside WAN IP set up.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Shopping2000 » Thu Jun 04, 2009 7:12 pm

I like Qphoria's idea with sending first an "order confirmed email" and after paypal payment (and callback from paypal) an "payment received email" to the customer. Also the idea with setting the status first to "pending" (or "paypal-pending") and after the callback to something else (configurable?) would be great!

To the mentioned cons:
> - Requires javascript for the Ajax callback, but you need it for most of the store anyway

I don't get it... Where is more javascript code needed then in the current version? The only change is that when someone presses "Confirm Order" the status is set to pending and an email is send to the customer. After this the customer is forwarded to paypal and everything goes on like in the current version. Right?

> - Can lead to a lot of pending orders if the customer decided to just quit before paying

This would be okey for me. But I would like to have a status "paypal-pending" additional to the normal "pending". When I see a lot of "paypal-pending" orders I know that there is a problem with the paypay IPN (paypal changed something or my firefall is doing confusing things or whatever) or there is a customer who needs perhaps help. In booth cases I want to see the "tried" orders!

> - Can be more leg work if IPN isn't working, as there is no
> additional update check when the store returns, so you can
> have a lot of pending orders that are paid for.

For me I have much more work/trouble when my customers order something and because of problems with IPN I don't know anything about the order...

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Daniel » Thu Jun 04, 2009 7:57 pm

6. An ajax call is made to the order confirm function. This function changes the order status to the store's default status set in the settings page. (usually PENDING) It also sends an email out to the customer & admin, which is where the confusion starts.


I changed it in the last version so the order is confrimed only on callback.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Thu Jun 04, 2009 8:04 pm

tommix wrote:hello to my world -you're number 3 who has this problem :) but my server is good it's VPS not in some cheap-crappy USA server..

it creates orders, but don't show in admin-only in DB you can see them and need to assign order_id to be not 0, 1 = pending, 5= complete.

But in my case it worked until import..or until some unknown stuff happens.
Tommix,

I have repeatedly asked you to pm me your login details so i can confirm this bug myself.

Looking at your previous posts it is clear to me you did a botched update.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Thu Jun 04, 2009 8:09 pm

Shopping2000 wrote:I like Qphoria's idea with sending first an "order confirmed email" and after paypal payment (and callback from paypal) an "payment received email" to the customer. Also the idea with setting the status first to "pending" (or "paypal-pending") and after the callback to something else (configurable?) would be great!
You misread...this is how it CURRENTLY IS.. not my ideas. You can already set the different states with paypal.
To the mentioned cons:
> - Requires javascript for the Ajax callback, but you need it for most of the store anyway

I don't get it... Where is more javascript code needed then in the current version? The only change is that when someone presses "Confirm Order" the status is set to pending and an email is send to the customer. After this the customer is forwarded to paypal and everything goes on like in the current version. Right?
Also misread, this is already how it is. The ajax callback is already how it works. I'm explaining its pros and cons. I'm just noting why it can be considered a con.
> - Can lead to a lot of pending orders if the customer decided to just quit before paying

This would be okey for me. But I would like to have a status "paypal-pending" additional to the normal "pending". When I see a lot of "paypal-pending" orders I know that there is a problem with the paypay IPN (paypal changed something or my firefall is doing confusing things or whatever) or there is a customer who needs perhaps help. In booth cases I want to see the "tried" orders!
This is already how it is except there is no temp order viewer.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Thu Jun 04, 2009 9:07 pm

It might be an idea if I have a temp order page so people can set the orders as confirmed.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Shopping2000 » Thu Jun 04, 2009 10:59 pm

Qphoria wrote:You misread...this is how it CURRENTLY IS.. not my ideas.
Now I'm confused... But I even don't get the first E-Mail (the second E-Mail after the IPN I also don't get, but this could be a problem of my web host)...

First, in \catalog\controller\payment\paypal.php i can find the functions index() and callback() --- NO confirm() function is there.

When callback() is called (IPN arrived) this is executed:
$this->model_checkout_order->confirm($order_id, $this->config->get('paypal_order_status_id'));
which calls confirm(...) in \catalog\model\checkout\order.php as I aspect.

In \catalog\view\theme\default\template\payment\paypal.tpl i can find this ajax code:

Code: Select all

 
function confirmSubmit() {
	$.ajax({
		type: 'GET',
		url: 'index.php?route=payment/paypal/confirm',
		success: function() {
			$('#checkout').submit();
		}
	});
}
...and this calls (i think) the confirm() function in \catalog\controller\payment\paypal.php. But there isn't such a function? So no first E-Mail, right? But why you get the first one?

Sorry, I never learned PHP and only read just now an beginners guide. I hope I'm not totally wrong...

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Qphoria » Thu Jun 04, 2009 11:34 pm

Shopping2000 wrote: Now I'm confused... But I even don't get the first E-Mail (the second E-Mail after the IPN I also don't get, but this could be a problem of my web host)...

First, in \catalog\controller\payment\paypal.php i can find the functions index() and callback() --- NO confirm() function is there.

When callback() is called (IPN arrived) this is executed:
$this->model_checkout_order->confirm($order_id, $this->config->get('paypal_order_status_id'));
which calls confirm(...) in \catalog\model\checkout\order.php as I aspect.

In \catalog\view\theme\default\template\payment\paypal.tpl i can find this ajax code:

Code: Select all

 
function confirmSubmit() {
	$.ajax({
		type: 'GET',
		url: 'index.php?route=payment/paypal/confirm',
		success: function() {
			$('#checkout').submit();
		}
	});
}
...and this calls (i think) the confirm() function in \catalog\controller\payment\paypal.php. But there isn't such a function? So no first E-Mail, right? But why you get the first one?

Sorry, I never learned PHP and only read just now an beginners guide. I hope I'm not totally wrong...

Oh i see.. Daniel must have changed it then. The way I described is how it used to work.
Now it appears to be more like this:

1. You checkout
2. Choose Shipping
3. Choose Paypal
4. Land on Confirm page. This is where the "temp" order... or status 0 order is created.
5. Press confirm.
6. It sends the customer to Paypal
7. Customer pays and an IPN is sent back to your store.
--- The IPN, if successful, will confirm the order directly to the final order status set in the paypal configuration (usually PROCESSING). It sends out one email here for the status to the customer & admin.
--- The IPN, if not successful, it will not update the order and the order is lost

Pros:
- none.
Cons:
- No backup client-side method, order will be lost if IPN doesn't hit.
- Requires javascript for the Ajax callback, but you need it for most of the store anyway
- Can lead to a lot of pending orders if the customer decided to just quit before paying
- Can be more leg work if IPN isn't working, as there is no additional update check when the store returns, so you can have a lot of pending orders that are paid for.

So IMO, it went from slightly confusing to much worse, as now orders can be lost. Its like the old 0.7.8 version.

Daniel, IMO:
You either need to add back the ajax confirm with the option to disable email sending
and/or
Include a client-side backup method that also confirms the order if the customer returns to merchant.

The way it is now relies only on IPN and will just lose the order. At least with the old ajax confirm you'd have the order. Just add the option to skip email and you would be set.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Thu Jun 04, 2009 11:35 pm

shopping2000 please stop asking questions.

i don't know why you can't get it working but you you have been using freehosting with hidden tracking running in the background.

if it doesn't work change hosts! the host is clearly not very good.

Why bother telling people you have a problem with emails not being sent out? I don't think a freehost would allow sending mails out because it would get abused.

They could be blocking ports or the tracking is interfering with the response from paypal etc...

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Shopping2000 » Fri Jun 05, 2009 12:12 am

[quote="Daniel""]
shopping2000 please stop asking questions.
[/quote]
Sorry, until now I was thinking that the BBS is for questions, so people who has questions can get answers...
Daniel wrote: i don't know why you can't get it working but you you have been using freehosting with hidden tracking running in the background.
That I have a problem with the callback is relative clear, but I don't understand my problem with the first Email (okey, now I know - because it's not implemented...)

But as also Qphoria said already, it can be dangerous to rely on the callback of paypal. There are a lot of things which can cause that it will not arrive. So even when the callback will work for me later after I changed the server, I would like to have the fallback solution!
Daniel wrote: Why bother telling people you have a problem with emails not being sent out? I don't think a freehost would allow sending mails out because it would get abused.
Sorry Daniel, but I told already that it is working without any problems when I'm using bank transfer. Also all Emails are sended out. So I think it is not "bothering" when I tell that it is not working when I use paypal.

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by Daniel » Fri Jun 05, 2009 12:53 am

its not working with you are using a crap host.

everytime you post something like this i go round checking and testing the code. it works fine for me and many othger people.

I'm not changing it back because it should not work that way. you need to configure your server properly. that is down to you. it is not the softwares fault and should not be reported as a bug.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Shopping2000 » Fri Jun 05, 2009 1:06 am

Daniel wrote: its not working with you are using a crap host.
FYI: I'm doing this things here to help some friends in northwest china to open there own web shops. For them a "cheap server" for 5 Euro per month is already five times going eating...
Daniel wrote: everytime you post something like this i go round checking and testing the code. it works fine for me and many othger people.
Sorry that I want to understand the code... By the way: Good software is not only "working fine" in daily life situations. Good software works also when there is a fault (outside or inside). I don't want to say that your software is not good (in fact I like it very much). But I want to say that you shouldn't say that it is working now, so I don't have to look for it anymore. What will happen when Paypal changes their callback system and a few shop-owners who run OpenCard will not update their shop because "it works fine" for them (and they don't know that paypal wants to change something)? They will wonder why suddenly nobody is ordering on their homepage anymore. That the orders are only lost in the db they will never know - or only much later...
Daniel wrote: it is not the softwares fault and should not be reported as a bug.
I never reported it as bug, i was discussing about my problem and about problems in fault situations.

FYI: This HERE is the "Module Support" Sub-Forum and not the "Bug Reports" Sub-Forum.

Newbie

Posts

Joined
Sun May 03, 2009 1:48 am

Post by justpurple » Wed Jun 24, 2009 3:55 pm

we have been having this same problem with http://www.honeyhousekuranda.com/shop and have done the recommended changes eg: with the lowercase on the paypal.php file and still no luck.

the whole process appears to go through ok but the buyer and seller do not get an order notification email and the order does not show in the admin.

PLEASE HELP WE HAVE SPENT 8 HOURS TRYING TO SORT THIS OUT TODAY... THANKS :(

Newbie

Posts

Joined
Wed Jun 24, 2009 3:51 pm
Who is online

Users browsing this forum: No registered users and 18 guests