I have a rather perplexing issue that I'd really appreciate help with.

I have a client site using Recurly.js where about half of the orders don't get saved as accounts on the Drupal site. The orders always make it to Recurly, but the subscription doesn't always save in Drupal. It appears, in these cases, that the Drupal form hooks never get fired. One way I know this is I have a custom module that saves the customer's shipping address in a session, and then saves the address in the database after a custom submit handler is triggered on the checkout form. My initial thought was, of course, that my custom module was causing the process to fail. This doesn't seem possible, though, because half the time everything saves fine. Both the subscription and shipping address are saved successfully and when it fails my custom submit handler is never fired; which makes me think the "non-recurly" part of the checkout form is never submitted.

Unfortunately, as far as I can tell, the times where it works and where it doesn't are completely random. It appears to work and fail equally for all browsers (even IPad and mobile). I thought, perhaps, it was an issue with IE and jsonp, but there are examples of successful transactions in IE, as well as unsuccessful transactions in other browsers. Also, we can only replicate the issue when we click "Checkout" and immediately close the browser. Most customers who experience this issue, however, report that they did not leave the checkout screen after submitting their order.

So basically, I'm stumped. Does any have any ideas?

Thank you!

Comments

drum5ormore’s picture

It appears that most customers who experience this issue are redirected to the login page after a successful purchase. I have a redirect in place that sends users to the login page if they're not logged in when they reach the checkout page.

If users are getting sent to the login page, it means they're being logged out, or their session is expiring after a successful purchase. That would explain why a Drupal Recurly account is not created in these cases.

Anyone have any idea what might be going on?

eojthebrave’s picture

I'm not 100% sure but I think that I'm experiencing this issue was well.

I have transactions where everything looks fine on the recurly side, account is setup, subscription is legit, push notifications are marked as delivered. But my custom code is never run on the drupal side, making account's "active".

This also follows the strange pattern above in which it works just fine most of the time. So there appears to be either something missing in the push notification or something else causing occasional failure.

I don't have enough data yet to really figure out what's going on, but I've enabled more logging and will keep digging.

eojthebrave’s picture

For reference this ended up being a false alarm on my part. The problem was elsewhere.

Some of the things I tested though to make sure they where not causing the problem:

- Disable varnish
- Disable memcache
- Check apache logs to make sure that apache is seeing all the incoming push notifications that I expected it to see, ruling out the possibility that they got lost in the ether.

Might help you figure out what's going on with your particular setup.

jordanmagnuson’s picture

@eojthebrave: so some of your orders weren't saving in Drupal, but the issue was not with this module? Can you explain what the issue turned out to be? (Was it with Varnish/Memcache/something else)?

@drum5ormore did you ever get this issue resolved?

Anyone else experiencing this at all?

eojthebrave’s picture

My issue was actually bad code in another module that was also acting on the recurly push notifications.

nDigitHQ’s picture

I believe this is still an issue. We have a client who is experiencing this problem.. eojthebrave -- what module was causing issues?

Internet Explorer 9 is having some issues. When someone clicks the submit button, it would just sit there. Their information would go in, but the user wouldn't be directed anywhere. I checked the JS to make sure it's not something there.

Could this be an issue with the version 2 of the API? They have had a lot of problems with their push notifications.

aburke626’s picture

Are you still having this issue? There's a development release now using v3 of Recurly.js, so I'm hoping that resolves this issue, since we don't seem to have any more details about what's happening when the orders fail. Take a look and test it out and let me know if anything changes.

aburke626’s picture

Status: Active » Closed (won't fix)

Over a month with no activity. I don't think this is a Drupal-level issue.