Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
E-mails not sent from time to time
Posted: 23 July 2012 03:09 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  13
Joined  2012-02-02

Hi ho!

I’m using cartthrob for a website for a client. Sometimes, the confirmation e-mails aren’t sent out (or at least: aren’t received). I’ve thoroughly looked at spam settings and such and am quite sure that mails aren’t being blocked - so then it must be the case that they aren’t sent out. The strangest thing is that the behavior seems random.

When an order is placed, two notifications are sent: one to the customer, one to the shop owner. They are sent on the event “Successful Transaction”. The ones to the shop owner sometimes aren’t received. I cannot confirm at this point if the notifications to the customers are sent, but I’ve tested it myself about 20 times with different adresses, and they seem to arrive…

Now I’m not sure if the ‘not sending’ has to do with Cartthrob, it’s settings, ExpressionEngine or the hosting company. Since you guys normally respond really fast (which I love, thanks for that smile ) I’m taking my luck here. The people at the hosting-company provided me with stuff from their log, but I’m not sure what it means:

# grep 1Si54x-0001PC-5t mainlog
2012-06-22 16:43:19 1Si54x-0001PC-5t <= <> R=1Si54w-0001PB-R6 U=mail P=local S=9416 T=“Mail failure - no recipient addresses” from <> for .(JavaScript must be enabled to view this email address)
2012-06-22 16:43:19 1Si54x-0001PC-5t ** .(JavaScript must be enabled to view this email address) F=<> R=virtual_aliases:
2012-06-22 16:43:19 1Si54x-0001PC-5t Frozen (delivery error message)

Do you have any idea?

If you need more information, please let me know. Thanks in advance for your time smile!

Profile
 
 
Posted: 24 July 2012 11:55 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

Looks like there’s no email address attached. Is this log for an email that didn’t make it to the admin? Or to the customer?

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 24 July 2012 11:24 PM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  13
Joined  2012-02-02

I can’t say for sure, but I think it’s for the admin… the e-mail-field for customers is required so it would be weird for that address to be missing, I suppose?

Profile
 
 
Posted: 25 July 2012 03:22 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

What version of CT2 do you have installed?

(if not 2.1.4 I’d suggest an upgrade)

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 31 July 2012 11:46 PM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  13
Joined  2012-02-02

Hi Chris,

Sorry for the late reply. I’m running 2.1.1. Updating to 2.1.4 unfortunately caused some problems with a custom payment gateway I developed and at this moment I can’t put too much time in figuring out what’s causing the problems, so I rolled back to 2.1.1 for the time being.

I understand this makes helping me more difficult, but I did find something that might help: every now and then, an order is placed and for some reason the e-mail isn’t saved to the orders channel - these are the orders where the notifications aren’t sent. This is strange though, because the e-mail field is required in the template. However; the moment you manually add the e-mail through the CP later on, the notification is sent out. Does this perhaps ring any bells to you?

I’ll go and walk through the template to see if I can find any inconsistencies. I’ll keep you posted. Thanks again smile.

Profile
 
 
Posted: 01 August 2012 07:31 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

the moment you manually add the e-mail through the CP later on, the notification is sent out

This sounds more like you have one of the status notification emails set up. The initial order notification is different.

This is strange though, because the e-mail field is required in the template.

An upgrade to 2.1.4+ would fix this. There were some validation things that were corrected from 2.1.1 to 2.1.4.

I developed and at this moment I can’t put too much time in figuring out what’s causing the problems,

I write all of our gateways, and I’m very familiar with the system (I wrote most of it) so feel free to send me the file and I can probably tell you what to change.

 

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 01 August 2012 10:58 PM   [ Ignore ]   [ # 6 ]
Wallflower
Rank
Total Posts:  13
Joined  2012-02-02

Thanks for your reply.

I’ll send you the file in an e-mail. I’ve also attached a screenshot of the notification settings for when an order is placed.


Reinoud

Image Attachments
Screen_Shot_2012-08-02_at_8.54.44_.png
Profile
 
 
Posted: 02 August 2012 06:11 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

They are sent on the event “Successful Transaction”.

Here’s the problem with your gateway. It will never trigger the Successful Transaction trigger. If the gateway ever triggered that itself… It’s just not possible. You might have something else on your success_url or a custom script that triggers that condition, but the gateway doesn’t. Normally, to get that success event to fire, you’d have to handle a response and pass it off to gateway_order_update

$this->gateway_order_update($auth$order_id$this->order('return')); 

 

That has calls to fire off events based on the contents of $auth.

To sum up. Your gateway file is not capable of completing a transaction. You may have code somewhere else that does this, but it’s not in the gateway file.

I’ve sent you a copy of our Rabobank Omnikassa gateway to show you how I do this. Pay particular attention to the extload function which handles all of the response from Rabobank, and then updates the order. The link to the extload.php script is generated by this:

$this->response_script(ucfirst(get_class($this))), 

 

You could send multiple things to it like this:

$this->response_script(ucfirst(get_class($this)), array("method" => "success")),
$this->response_script(ucfirst(get_class($this)), array("method" => "error")),
$this->response_script(ucfirst(get_class($this)), array("method" => "cancel")),
$this->response_script(ucfirst(get_class($this)), array("method" => "fail")), 

 

which would basically generate something like

http://example.com/extload.php/your_gateway/success
http://example.com/extload.php/your_gateway/error
http://example.com/extload.php/your_gateway/cancel
http://example.com/extload.php/your_gateway/fail 

 

You can then deal with any $_POST or $_GET data via the $post parameter of the function. (you can look for something like $post[‘ct_action’] = “error”… there are a few ct_ array keys that contain info about the URL itself)

One of these days I’ll put all this in the docs. :-D

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 05 August 2012 11:33 PM   [ Ignore ]   [ # 8 ]
Wallflower
Rank
Total Posts:  13
Joined  2012-02-02

Hi Chris,

Thanks for your help. I can imagine you have little time to update the docs while you keep helping slackers like me wink. So the extload function is called by a response from Rabobank if I’m correct?

The thing is that in my case, iDeal Lite is being used - which basically means there is no response by the bank. So when an order is placed, the client is taken offsite and pays (or fails to pay) there. Then, the client is returned to a fixed path, but it would of course be unsafe to let clients verify a payment simply by hitting a return url.

So the payments are verified by manually. All that needs to happen is the order to be saved to the database and the notifications to be sent. As I look at all this, I’m unsure why the guy that made me this gateway used the Successfull Transaction trigger, rather than the “Customer completing transaction offsite” one. Wouldn’t it make more sense to use that one? Would it be able for the gateway to pull that trigger? My gut tells me I could change something right at the end of the gateway:

$this->gateway_order_update($auth$this->order('entry_id'));
$this->gateway_exit_offsite($post_array$url FALSE$jump_url $this->url); 
Profile
 
 
Posted: 07 August 2012 07:32 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

as long as $auth contains something like this:

$auth = array(
'authorized' => TRUE,
); 

 

then you can use that code you mention.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile