Copied to clipboard

Flag this post as spam?

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


  • Henrik Kulterud 9 posts 29 karma points
    Jun 15, 2012 @ 23:44
    Henrik Kulterud
    0

    PayEx callback

    We are working on an Umbraco sollution with TeaCommerce using PayEx as the payment provider. The shop itself works fine, but we have problems with the comfirm-page after the payment-process, as I can not find out how to capture the payment status. What I want is to know if the payment is comfirmed or if PayEx returns fail/declided. Can you help me how to get this status on my comfirmation page?

    Using Firebug I have tried using the finalizedOrders paymentStatus-property, but this seems to be unstable or buggy. In FireFox this object (finalizedOrder) is null for the first payment, and then seems to be ok for the next order. In Safari/Chrome it is empty every time, and therefor I can not rely on this object.

    I would be happy for help and tips turning me in the right direction.

  • Anders Burla 2560 posts 8256 karma points
    Jun 17, 2012 @ 17:34
    Anders Burla
    0

    Hi Henrik

    We talked to you at Codegarden, right?

    Did Rune solve the problem with you?

    Kind regards
    Anders

  • Henrik Kulterud 9 posts 29 karma points
    Jun 17, 2012 @ 18:11
    Henrik Kulterud
    0

    Hi Anders!

    Yes, we takled at Codegarden :) and we solved the issue concerning the cart-error using the async-sollution you suggested, it worked, thank's!

    The issue mentioned above came up when PayEx tested our sollution, as the comfirmation-page allways said "Thank you", even when the payment failed (we had not looked into this scenario when we spoke). Then I started working on a check on the comfirmation-page as mentioned above.

    I have tested alot, and it seems like there is no finalized order when I enter the comfirmation-page (coming back from PayEx), but even more confusing: this is not always so. When I close my browser and delete all cache, and do a successful buy using card and return to the comfirmationpage, there is no finalized order-object (the only order object I can find using firebug is the new one created by teacommerce). But in the admin the order is registred as "new" with paymentStatus = "Authorized". And then, when I try this the second time (not deleting cache or close the browser), there is a finalizedOrder and everything is fine.

    I am using xslt to print the result and check for the finalized order, but even when I call TeaCommerce.getFinalizedOrder from Firebug after the page is redered, I get no object. (Safari and Chrome also produce the same issue, but at times it seems to behave different in those browsers and give no finalized orders every time).

    Do you have any suggestion what could be the problem?

    Thank you so much for your help, and for this great package :)

  • Anders Burla 2560 posts 8256 karma points
    Jun 18, 2012 @ 09:03
    Anders Burla
    0

    The PayEx provider finalizes the order at the continue url. This means that when the customer has paid at PayEx he is redirected to the "magic" Tea Commerce continue URL. This then calls the finalize method of the provider because this is specified in the inplementation. This finalizes the order and sets the status to Authorized and New. Now the continue method continues and moves the order id to the session variable - finalized order id and now redirects to the continue url specified in your payment provider settings. So what might happen is the redirection isnt correct and that the browser somehow is in a new session and then cant move the order id in the session variables. But the weird thing is that you say it sometimes works. Try debug some more and see if my info gives you any ideas.

    Kind regards
    Anders

  • Henrik Kulterud 9 posts 29 karma points
    Jun 18, 2012 @ 16:35
    Henrik Kulterud
    0

    Hi, thank you for explaining the process!

    The first buy "fails" due to no finalizedOrder-object, but then It works on the next try, this seems to be steady now. Using your information the problem seems to be related to the session, it seems like there is no session availible the first time I come back from the provider. Is there any way to force the session to work the first time as it works the second time? I will continue debugging and try to reveal the problem :)

  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    Apr 20, 2013 @ 13:33
    Ulrich Wagner Gade Ebsen
    0

    Hi, 

    Did you ever fin a solution with this? I facing the exact same situation but with ePay.. :-/

    Regards
    Ulrich Ebsen 

  • Anders Burla 2560 posts 8256 karma points
    Apr 22, 2013 @ 10:30
    Anders Burla
    0

    Hi Ulrich

    What Tea Commerce do you have installed? And what Umbraco version?

    We have loads of developers that use ePay and have never heard of anyone that has this problem.

    Where can I see this problem in action? Running the website live?

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft