Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Josefson 15 posts 37 karma points
    Sep 05, 2017 @ 17:42
    Peter Josefson
    0

    Timing problem with Klarna and possibly other payment providers

    There are cases when the authorization callback from Klarna doesn't get processed until after the user arrives at the confirmation page. The reason is that the callback and the redirect are made almost simultaneously by Klarna, so it's a bit random which wins.

    In this case, the confirmation page won't contain anything, and any custom code depending on currentOrder (finalized) won't run (if it checks for null, otherwise it will crash).

    Workaround: If currentOrder is null, sleep for 500 ms and try again (GetCurrentFinalizedOrder). Repeat for 10 seconds.

    Looks like it's working.

    I've seen similar problems in other systems with DIBS, so this could be a problem with other payment providers as well.

  • Anders Burla 2560 posts 8256 karma points
    Sep 07, 2017 @ 08:44
    Anders Burla
    0

    Hi Peter

    What version of Tea Commerce are you using?

    Normally when you redirect the customer to the Tea Commerce continue url for an order. This is a "magic" url that moves the order to finalized order in session (even though the order isnt truely finalized yet from a callback) and then redirect to the continue url that is entered in the payment provider setting.

    The reason for this is that PayPal can be multiple minutes about making the callback. So I know this should work in Tea Commerce. But might depend on your version and also if you have done custom Klarna integration that doesn't use the right Tea Commerce continue url when redirecting.

    Kind regards

    Anders

  • Peter Josefson 15 posts 37 karma points
    Sep 07, 2017 @ 09:44
    Peter Josefson
    0

    Hi Anders,

    We're on TC 3.2.0 (conflicts with Umbraco Forms in newer versions, IIRC), but the Klarna stuff is newer (with some rewrites, as per another thread we had recently).

    I was unaware of the continue url, I think our settings make Klarna go directly to the confirmation URL. That would definitely explain the problem. I'll see if I can figure out how to do the continue url thing, if the problem persists.

    /Peter

Please Sign in or register to post replies

Write your reply to:

Draft