Copied to clipboard

Flag this post as spam?

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


  • Alex Meyers 25 posts 106 karma points
    Dec 06, 2013 @ 12:40
    Alex Meyers
    0

    TC.GeneratePaymentForm submitting to cancel URL

    Hi,

    I'm having trouble with generating the payment form step in the cart process. I'm using SagePay as the payment provider. I get to the accept step but when I move to the Payment step it sends me straight to the cancel url. I've had a look in App_Data logs and also checked the umbracoLog table but nothing seems to be showing there. It's not even getting to SagePay as nothing is shown in the Simulator either. 

    I've debugged it in the javascript debugger in Firebug to see where the problem is. Now I can see that it calls TC.GeneratePaymentForm but the server is responding strangely by sending it straight to the cancel url. 

    Thanks in advance,

    Alex

  • Anders Burla 2560 posts 8256 karma points
    Dec 06, 2013 @ 12:53
    Anders Burla
    0

    Hi Alex

    Nothing is logged during the generation of the payment form - so that is properly why you wont see anything.

    So try and look at the code and see if any of the things might go wrong and there for the status is not "OK". So that is why it redirects to the cancel url.
    https://bitbucket.org/teasolutions/tea-commerce-tea-commerce-payment-providers/src/ca05df6ebdb2d4a2bcffb8591ddf4df72368cb71/Source/TeaCommerce.PaymentProviders/Classic/SagePay.cs?at=default

    Kind regards
    Anders

  • Alex Meyers 25 posts 106 karma points
    Dec 06, 2013 @ 16:26
    Alex Meyers
    0

    Hi Anders,

    I've had a look through the code and it doesn't seem to be even getting to SagePay. The code seems to be fine other than that. I've sniffed the traffic via WireShark and can't see any transaction (although I may be missing it).

    Is there anything else I'm missing?

    KR

    Alex

  • Anders Burla 2560 posts 8256 karma points
    Dec 09, 2013 @ 08:45
    Anders Burla
    0

    Try and download the source code and build it and overwrite your payment provder dll in your website. Then attach the debugger and step through the different line of code.

    Kind regards
    Anders

  • Alex Meyers 25 posts 106 karma points
    Dec 09, 2013 @ 16:03
    Alex Meyers
    0

    We've downloaded the source code and overwritten the payment provider. When we call "GetFields" on line 141 in TeaCommerce.PaymentProviders.Classic.SagePay we get this:

     

    IDictionary<string, string> responseFields = GetFields( MakePostRequest( GetMethodUrl( "PURCHASE", settings ), inputFields ) );

    string status = responseFields[ "Status" ];

     

    Response

     

    {[StatusDetail, 3011 : The NotificationURL format is invalid.]}

     

    Any ideas?

     

     

     

  • Anders Burla 2560 posts 8256 karma points
    Dec 09, 2013 @ 16:15
    Anders Burla
    0

    can you see what format the notification url is? It is the teaCommerceCallbackUrl I think.

  • Alex Meyers 25 posts 106 karma points
    Dec 09, 2013 @ 17:12
    Alex Meyers
    0

    I can't see the notificationUrl as it's in compiled code and I can track the traffic in WireShark, but can't access the error as it's in SSL

  • Alex Meyers 25 posts 106 karma points
    Dec 09, 2013 @ 19:10
    Alex Meyers
    0

    Hi Anders,

    We've stepped through the code and now were having difficulty with the country code for UK. It is set to 'GB' but for some reason changes it to GBP, but that's for the currency.

    Any idea?

    KR

    Alex 

  • Anders Burla 2560 posts 8256 karma points
    Dec 10, 2013 @ 08:54
    Anders Burla
    0

    The BillingCountry and DeliveryCountry uses the RegionCode of the payment country and shipping country. So it should not fallback to the currency ISO code... But the source code doesn't do anything like that.

    Kind regards
    Anders

  • Alex Meyers 25 posts 106 karma points
    Dec 10, 2013 @ 11:02
    Alex Meyers
    100

    Sorry, it was the Region Code configuration setting in TeaCommerce. It was set to 'GBP' when it should have been 'GB'

    Thanks for your help

    KR

    Alex

  • seanrock 260 posts 481 karma points
    Jan 29, 2015 @ 12:05
    seanrock
    0

    This still does not work with GB. it just cancels the order without any loging notification or anything....very bad design.

  • Anders Burla 2560 posts 8256 karma points
    Feb 02, 2015 @ 14:09
    Anders Burla
    0

    Hi Sean

    Have you looked in the Umbraco log file in App_Data/Logs?

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft