Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points c-trib
    Aug 04, 2013 @ 22:30
    Dan
    0

    Tea Commerce: Hashing methods renamed for payment providers

    Hi,

    I'm upgrading a Tea Commerce 2.0.0 installation to 2.1.3. I've rearranged the billing/shipping details form to the updated structure as detailed here: http://documentation.teacommerce.net/html-api/order-property/addorupdateorderproperties/ but I'm still getting an error "Error loading MacroEngine script (file: /cart/step-shipping-payment.cshtml)" on the 'Cart Step 03 (shipping/payment)' screen.

    When I comment out the payment provider razor code in that macro, the page loads fine, so I'm assuming it's an error with the payment provider code. I wondered if this is something to do with the revision history notes which says that there's a breaking change in 2.1.3:

    Hashing methods renamed for payment providers

    What does this mean? Would it affect my implementation? I'm using Authorize.net payment provider.

    Any help in overcoming this issue would be very much appreciated.

    Thanks.

  • Dan 1288 posts 3921 karma points c-trib
    Aug 04, 2013 @ 23:49
    Dan
    100

    As is becoming tradition, I found the answer...

    Oddly it was to do with the Razor method calling the images. So anywhere images were being rendered in the TeaCommerce razor macros, like this:

    string imageUrl = imageId != null ? Model.MediaById(imageId.Value).Url : "";

    They needed to be changed to something like this (needs more defensive coding in place in case values are empty etc):

    int nodeId = imageId.Value; // get this from wherever!

    var media = new umbraco.cms.businesslogic.media.Media(nodeId);

    var file = media.getProperty("umbracoFile");

    string imageUrl = file.Value.ToString();

    (Also, apparently the media API is the slowest way to get images in Razor, so I'll look for an alternative.)

    With these swapped out, there didn't seem to be an issue with 'Hashing methods renamed for payment providers' so I'm still curious as to what that does?

  • Anders Burla 2560 posts 8256 karma points
    Aug 05, 2013 @ 11:14
    Anders Burla
    1

    The "Hashing methods renamed for payment providers" means the API for the payment provider changed. We update the Tea Commerce supported payment providers and ship them with Tea Commerce so you dont need to take action. But if you did implement your own provider you would need to recompile using the new dll and API.

    Kind regards
    Anders

  • Dan 1288 posts 3921 karma points c-trib
    Aug 06, 2013 @ 00:10
    Dan
    0

    Thanks for clarifying that Anders. Nice work on making TC so easy to upgrade by the way; breaking changes aside (which are all documented), the upgrade process is very smooth so good work on that!

Please Sign in or register to post replies

Write your reply to:

Draft