Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1444 posts 1855 karma points
    Jul 09, 2019 @ 08:28
    Gordon Saxby
    0

    Umbraco crashes without Security and Licences Permission

    Umbraco 7.7.13 - upgraded from 7.6.13 which added new User management.

    After upgrading Umbraco, I found that a user (Umbraco login) had a problem when logging in. The login worked, but Umbraco showed an error message and none of the icons down the left hand side appeared. Logging in worked fine for me and another user.

    Long story short - it turned out that I had to tick "Security" and "Licences" in the TeaCommerce permissions for the user. With those ticked, Umbraco works fine. Untick either one and the error returns!?

    It is handy that I've found the problem, but the solution is not ideal. I don't want to give everyone access to the "Security" settings!

    Any idea what might be causing this?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 09, 2019 @ 08:58
    Matt Brailsford
    0

    What version of Tea Commerce are you running on?

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 09, 2019 @ 09:01
    Gordon Saxby
    0

    v3.3.0 ... I think!

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 09, 2019 @ 09:06
    Matt Brailsford
    0

    You might need to update to 3.3.1 then, there was a fix for this in that release. See the changelog here https://docs.teacommerce.net/changelog/3.x/

    You may need to bare in mind however, 3.3.1 has the SCA update to the Stripe payment provider in it which does require changed to the providers setup. This is documented on the payment providers docs page however https://docs.teacommerce.net/3.3.1/payment-providers/stripe/

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 09, 2019 @ 09:49
    Gordon Saxby
    0

    Ah, OK! That could solve 2 issues / jobs in one then :-) I'll try upgrading.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 09, 2019 @ 15:10
    Gordon Saxby
    0

    Regarding the changes required - is it just the Webhook setup that is new?

    Your documentation page says:

    Click Developers and then Webhooks in the left hand side menu. On the right hand side, click Add Endpoint and enter the Tea Commerce cummunication URL as follows (replacing the parameters in square brackets with the corisponding values taken from your store):

    https://[domain]/base/TC/PaymentCommunicationWithoutOrderId/[storeId]/Stripe%20-%20inline/[paymentMethodId]

    Umm, where do I take the values from in my store?! (sorry, probably really obvious but I can't see them).

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 09, 2019 @ 15:31
    Matt Brailsford
    0

    Hey Gordon,

    Good questions.

    Upgrading the Stripe provider is a 3 step process.

    1) Register webhooks with stripe and record it's secret
    2) Reload and re fill in the payment provider settings (you'll want to copy these before you click "load defaults")
    3) Update the payment forms markup with the code found here https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/blob/master/Source/TeaCommerce.PaymentProviders.UI/Views/Partials/StripePaymentForm.cshtml

    Regarding the IDs, you are absolutely right that we don't have a friendly way of getting those, I'll definitely look at a better way to grab them, but for the time being, if you go to edit the payment provider, right click in the edit area and choose "view frame source", you can then grab them from the querystring

    enter image description here

    id relates to the payment method ID, and storeId is the store id.

    Thanks for pointing this out :)

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 11, 2019 @ 09:22
    Gordon Saxby
    0

    Looking at the config values here https://docs.teacommerce.net/3.3.1/payment-providers/stripe/#configure-stripe and comparing to our current setup, it looks like I just need to add the "webhook" settings.

    However, we have a "capture" setting (set to true), but that doesn't appear on your list? Do I keep it or delete it?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 11, 2019 @ 09:24
    Matt Brailsford
    0

    Hi Gordon,

    That's right yea, I think just adding the webhook secrets would be enough to get it started. There are a few settings that have been removed, but it won't hurt if they are still there (capture being one of them).

    Anything that's not on the list in the docs can be safely removed.

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 11, 2019 @ 15:50
    Gordon Saxby
    0

    Umm, it doesn't seem to be working right now:

    enter image description here

    I made one order, but got these two entries, neither of which are completed. E.g. they do not appear as an "Order".

    Why am I getting duplicate orders and why isn't it completing? Any suggestions on what to look at / check?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 11, 2019 @ 16:01
    Matt Brailsford
    0

    Hey Gordon,

    These are essentially carts while they are not finalized. If they aren't finalized then I'm guessing it's because the webhook hasn't come through. Is this on your local machine? or on a live server? Have you looked in the log file for any errors?

    Give those a try and see what you find.

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 12, 2019 @ 07:44
    Gordon Saxby
    0

    Ah, look what I found:

     2019-07-11 16:20:36,416 [P8816/D2/T53] ERROR TeaCommerce.PaymentProviders.Inline.Stripe - Stripe(KRVO_2052) - GetStatus
    System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found. ---> System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found.
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       --- End of inner exception stack trace ---
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
       at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttributes[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttribute[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonTypeReflector.GetAttribute[T](MemberInfo memberInfo)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.SetPropertySettingsFromAttributes(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, Object attributeProvider, String name, Type declaringType, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization, Boolean& allowNonPublicAccess)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperty(MemberInfo member, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperties(Type type, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateObjectContract(Type objectType)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.ResolveContract(Type type)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.StripeObjectConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.CreateObject(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, TeaCommerce.PaymentProviders.Stripe907307.JsonContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Deserialize(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer.DeserializeInternal(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject(String value, Type type, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject[T](String value, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Stripe.Mapper`1.MapFromJson(String json, String parentToken, StripeResponse stripeResponse)
       at TeaCommerce.PaymentProviders.Inline.Stripe.GetStatus(Order order, IDictionary`2 settings)
    

    The site is on an Internet facing / accessible server. Testing the webhook from the Stripe dashboard appears to work?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 12, 2019 @ 08:12
    Matt Brailsford
    0

    Hmm, that's interesting. What version of .NET is the site running under?

    And at what stage does that error occur?

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 12, 2019 @ 08:39
    Gordon Saxby
    0

    Server .Net version is 4.7.2661.0 Project compiled against Framework 4.5.1

    I assume the error was when I made the order, but you don't see anything on-screen.

    I just did a test "webhook" call from the Stripe Dashboard and got this in the Umbraco log:

     2019-07-12 09:28:39,147 [P6152/D2/T64] INFO  TeaCommerce.PaymentProviders.Inline.Stripe - Form:
    
     2019-07-12 09:28:39,152 [P6152/D2/T64] ERROR TeaCommerce.PaymentProviders.Inline.BaseStripeProvider - BaseStripeProvider - GetWebhookStripeEvent
    System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found. ---> System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found.
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       --- End of inner exception stack trace ---
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
       at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttributes[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttribute[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonTypeReflector.GetAttribute[T](MemberInfo memberInfo)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.SetPropertySettingsFromAttributes(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, Object attributeProvider, String name, Type declaringType, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization, Boolean& allowNonPublicAccess)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperty(MemberInfo member, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperties(Type type, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateObjectContract(Type objectType)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.ResolveContract(Type type)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.StripeObjectConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.StripeObjectConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.CreateObject(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, TeaCommerce.PaymentProviders.Stripe907307.JsonContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.EventConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Deserialize(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer.DeserializeInternal(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject(String value, Type type, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject[T](String value, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Stripe.Mapper`1.MapFromJson(String json, String parentToken, StripeResponse stripeResponse)
       at Stripe.EventUtility.ParseEvent(String json, Boolean throwOnApiVersionMismatch)
       at TeaCommerce.PaymentProviders.Inline.BaseStripeProvider.GetWebhookStripeEvent(HttpRequest request, String webhookSecret)
    
  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 12, 2019 @ 09:42
    Matt Brailsford
    0

    Hmm, I've come across a similar error online to do with someone using ILMerge, which we do use to merge all the payment provider projects into one dll, but I've tested this locally with the merged dll, making an order, and I don't receive any errors so not sure why that would be.

    In addition, we have this DLL deployed on the teacommerce.net website as this is what we use for our payments, and we have received payments ok.

    Or all your DLLs up to date?

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 12, 2019 @ 09:52
    Gordon Saxby
    0

    Good question! I did an update of TeaCommerce using TeaCommerce3.3.1forUmbraco_7.zip. I only did that on my local dev, I then copied all changed files, with other application changes, to the testing server.

    Do I need to manually install the TeaCommerce upgrade on each server?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 12, 2019 @ 09:56
    Matt Brailsford
    0

    No, as long as all the DLLs are transferred over, it should be self installing/upgrading.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 12, 2019 @ 10:00
    Gordon Saxby
    0

    This is the TeaCommerce DLLs enter image description here

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 12, 2019 @ 10:16
    Matt Brailsford
    0

    I wonder what version of json.net you have installed as it's because of the deserialization that's causing an issue

    This should be embeded in the payment provider dll for each provider that needs it, but I wonder if that's not working and so it's using the version in the bin folder and if it's an old version, it could be an issue

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 12, 2019 @ 10:21
    Gordon Saxby
    0

    Umm, there is Newtonsoft.Json.dll, version 10.2.20802 in the bin folder?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 12, 2019 @ 15:43
    Matt Brailsford
    0

    Hmm, that's weird, those are the same versions as I have on a client site I recently upgraded so not sure why it wouldn't be working for you 🤔

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 15, 2019 @ 08:12
    Gordon Saxby
    0

    Any other ideas on how to debug / solve this issue? Is there a way that I can debug it locally?

    Edit: Trying to use ngrok, as suggested on your page "Configure Stripe" page and that just gives "404" whenever I send a webhook test (from Stripe dashboard) :-( Edit Again: got ngrok working! Now to see if it will help at all!

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 15, 2019 @ 09:44
    Gordon Saxby
    0

    I have success (?) with doing a test webhook call from the Stripe dashboard:

    enter image description here

    But I still get an error in the website log:

     2019-07-15 10:43:16,267 [P24448/D2/T155] ERROR TeaCommerce.PaymentProviders.Inline.BaseStripeProvider - BaseStripeProvider - GetWebhookStripeEvent
    System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found. ---> System.Reflection.CustomAttributeFormatException: 'NullValueHandling' property specified was not found.
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       --- End of inner exception stack trace ---
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
       at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttributes[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Utilities.TeaCommerce.PaymentProviders.Stripe907307.ReflectionUtils.GetAttribute[T](Object attributeProvider, Boolean inherit)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonTypeReflector.GetAttribute[T](MemberInfo memberInfo)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.SetPropertySettingsFromAttributes(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, Object attributeProvider, String name, Type declaringType, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization, Boolean& allowNonPublicAccess)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperty(MemberInfo member, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateProperties(Type type, TeaCommerce.PaymentProviders.Stripe907307.MemberSerialization memberSerialization)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.CreateObjectContract(Type objectType)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.DefaultContractResolver.ResolveContract(Type type)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.StripeObjectConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.StripeObjectConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.CreateObject(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, TeaCommerce.PaymentProviders.Stripe907307.JsonContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.SetPropertyValue(TeaCommerce.PaymentProviders.Stripe907307.JsonProperty property, TeaCommerce.PaymentProviders.Stripe907307.JsonConverter propertyConverter, TeaCommerce.PaymentProviders.Stripe907307.JsonContainerContract containerContract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty containerProperty, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.PopulateObject(Object newObject, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, TeaCommerce.PaymentProviders.Stripe907307.JsonObjectContract contract, TeaCommerce.PaymentProviders.Stripe907307.JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Populate(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Object target)
       at Stripe.Infrastructure.EventConverter.ReadJson(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer serializer)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.DeserializeConvertable(TeaCommerce.PaymentProviders.Stripe907307.JsonConverter converter, TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Object existingValue)
       at Newtonsoft.Json.Serialization.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerInternalReader.Deserialize(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonSerializer.DeserializeInternal(TeaCommerce.PaymentProviders.Stripe907307.JsonReader reader, Type objectType)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject(String value, Type type, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Newtonsoft.Json.TeaCommerce.PaymentProviders.Stripe907307.JsonConvert.DeserializeObject[T](String value, TeaCommerce.PaymentProviders.Stripe907307.JsonSerializerSettings settings)
       at Stripe.Mapper`1.MapFromJson(String json, String parentToken, StripeResponse stripeResponse)
       at Stripe.EventUtility.ParseEvent(String json, Boolean throwOnApiVersionMismatch)
       at TeaCommerce.PaymentProviders.Inline.BaseStripeProvider.GetWebhookStripeEvent(HttpRequest request, String webhookSecret)
    

    Not sure what I can do to test / debug locally?

    my Newtonsoft.Json.dll details: enter image description here

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 12:50
    Matt Brailsford
    0

    Hey Gordon,

    Hmm, the fact it has the Stripe907307 stuff in there tells me it is using the JSON.NET library that has been bundled in the payment providers dll. I'm still not sure why it's failing though as I've looked in the DLL and the JsonPropertyAttribute.NullValueHandling exists and like I say, I have this working on a couple of sites.

    Best I could suggest right now is whether you can pull the source for the payment providers and run the build.cmd file (press r then u for the questions it asks), but before then modify the Build\Build.Prepare.targets file, line 65 and remove the flag for /internalize:ILMerge.exclude.txt and on line 83 add a /union flag after the /ndebug flag and see if that helps. The dll will be the Artifacts\Files\bin\TeaCommerce.PaymentProviders.dll file.

    https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 15, 2019 @ 13:44
    Gordon Saxby
    0

    I now get this in the log:

     2019-07-15 14:41:06,787 [P5620/D8/T154] ERROR TeaCommerce.PaymentProviders.Inline.BaseStripeProvider - BaseStripeProvider - GetWebhookStripeEvent
    System.TypeLoadException: Could not load type '<>c' from assembly 'TeaCommerce.PaymentProviders, Version=3.1.7135.25744, Culture=neutral, PublicKeyToken=null' because the method 'DeserializeObject<TeaCommerce.PaymentProviders.Classic.QuickPay10+Result>' has no implementation (no RVA).
       at Stripe.Mapper`1.MapFromJson(String json, String parentToken, StripeResponse stripeResponse)
       at Stripe.EventUtility.ParseEvent(String json, Boolean throwOnApiVersionMismatch)
       at TeaCommerce.PaymentProviders.Inline.BaseStripeProvider.GetWebhookStripeEvent(HttpRequest request, String webhookSecret)
    

    Does that help in any way? I tried adding the Providers project to mine, to try and debug, but it won't compile (complains about 2 versions of Newtonsoft)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 13:52
    Matt Brailsford
    0

    Ahh, yea, that does ring a bell and is why I removed the /union call in the first place. I was hoping by removing the /internalize bit that it wouldn't be a problem, but I guess it is.

    Final thing then would be launch the sln file and compile the solution manually in release mode, then remove the TeaCommerce.PaymentsProvider.dll from your projects bin folder and copy over the individual dlls for the payment providers you want to support, plus their dependencies. By compiling them manually, there will be no merging of DLLs and you'll end up using the version of JSON.NET that is in the bin folder.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 15, 2019 @ 14:24
    Gordon Saxby
    0

    Well, I compiled the project and copied the following:

    TeaCommerce.PaymentProviders.Stripe.dll

    Stripe.net.dll

    System.Collections.Immutable.dll

    to my project - and now the test calls from the Stripe dashboard work without causing an error to appear in the Umbraco log. I just get this:

     2019-07-15 15:21:16,102 [P20764/D2/T11] INFO  TeaCommerce.PaymentProviders.Inline.Stripe - Form:
    

    So, is this the only solution, or is there a way to fix it so that I can just use the "normal" paymentproviders DLL?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 14:31
    Matt Brailsford
    0

    Hi Gordon,

    I'll have a look into whether the ILMerging can be done in another way, but like I say, I can't for the life of me figure out why it's working on two of my installs and not on yours so I think for the time being at least you'll be better of using your build of the dlls as it clearly doesn't like the one that comes with TC directly.

    I'll keep you posted.

    Matt

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 15:04
    Matt Brailsford
    0

    If you fancied trying this out, I have just compiled a new DLL this time using ILRepack rather than ILMerge incase that makes a difference. You can find the DLL here: https://www.dropbox.com/s/v3wxawpkosd5bq7/ILRepack.TeaCommerce.PaymentProviders.dll.zip?dl=0

    You'll probably want to remove the other DLLs you copied over whilst testing. I haven't done any tests with it myself, I've just got the merging working.

    Let me know how you get on and if it's any better, I may swap out ILMerge for ILRepack.

    Matt

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 15:15
    Matt Brailsford
    0

    I've got a feeling it could well work as looking into the dll with dotpeek the issue you posted above with the weird <>c type error is due to ILMerge union doing weird things, but looking at the dll from ILRepack it doesn't generate that error, so this might be the solution, to switch to using ILRepack.

    Let me know

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 15, 2019 @ 15:19
    Gordon Saxby
    0

    well, OK - I have removed the individual DLL's for Stripe and put the new DLL in and it seems to work. I have only tried sending test webhook calls from the Stripe dashboard, but that was generating errors before.

    Next, I would need to try it on our dev server and generate some actual orders. I will do that first thing tomorrow.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 15, 2019 @ 17:16
    Matt Brailsford
    0

    Perfect! Thanks Gordon.

    Appreciate you trying it out 👍

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 08:25
    Gordon Saxby
    0

    I have put the new DLL onto our Dev server and after sending test webhook calls from Stripe, I get apparent success at the Stripe end and this in the website log file:

     2019-07-16 09:21:14,621 [P9496/D2/T47] INFO  TeaCommerce.PaymentProviders.Inline.Stripe - Form:
    

    However, making an order on our Dev website still does not work (order stays as a cart). There are no messages in the log file.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 08:40
    Matt Brailsford
    0

    And you have stripe configured to post webhooks to your dev servers URL? Also, there are separate webhook registrations for live and test mode so you have configured the webhook relevant to the mode of your payment provider?

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 08:48
    Gordon Saxby
    0

    I followed the instructions here (except for the Radar bit) -

    https://docs.teacommerce.net/3.3.1/payment-providers/stripe/#configure-stripe

    I copied the DLL you created yesterday, replacing the one that comes with the current 3.3.1 release package. I sent test webhook calls from Stripe to the Dev server which worked and gave the simple log entry above. I then made an order and paid via the Stripe payment provider.

    The "order" stayed as a Cart, the basket was not emptied, there is no record of any Stripe activity in the website log nor on the Stripe website.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 08:54
    Matt Brailsford
    0

    So you managed to make payment on your dev server, and it did all the redirecting to the confirmation page, but nothing appeared at all in Stripe or the back office?

    I don't even know how that is possible, as if the order page worked, that would have created something in Stripe (are you sure you don't have dev setup in live mode or something so you aren't seeing the order because its in the live view or visa versa?) or errored.

    Are you seeing any JS errors on the order screen where you input the credit card details? Only thing I could think is that the JS isn't running at all and so it doesn't intercept and block the form submitting until stripe has done it's thing like it should.

    Matt

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 09:25
    Gordon Saxby
    0

    There are no errors on the payment page and it does go to the confirmation page.

    TeaCommerce has the Cart, but does not show it as an order: enter image description here

    The Stripe dashboard shows:

    enter image description here

    Is there anything you would like to see in the above log?

    Nothing shows in the Umbraco website log for Stripe at the time of the order.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 09:30
    Matt Brailsford
    0

    It really sounds like the JS for Stripe isn't running at all. You've definitely updated your view with the latest from github and pushed to your dev server?

    https://github.com/TeaCommerce/Tea-Commerce-Payment-Providers/blob/master/Source/TeaCommerce.PaymentProviders.UI/Views/Partials/StripePaymentForm.cshtml

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 09:37
    Gordon Saxby
    0

    Umm, I didn't realise / know there was a new version!? Did I miss that somewhere?

    I am just comparing it now, but it will take a little while as our designer has amended it to suit our site.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 09:44
    Matt Brailsford
    0

    Yea, I mentioned it in my 3 step upgrade process earlier https://our.umbraco.com/packages/website-utilities/tea-commerce/tea-commerce-support/98047-umbraco-crashes-without-security-and-licences-permission#comment-309275 It's the 3rd step.

    The JS for Stripe was updated significantly due to the SCA changes, so yea, it needs updating too.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 10:07
    Gordon Saxby
    0

    Oops, must have missed that!

    Updated the code and now I get an error -

    Country 'en-gb' is unknown. Try using a 2-character alphanumeric country code instead, such as 'US', 'EG', or 'GB'.
    

    Grrr! (used to be OK - or previously ignored - as the data I'm using hasn't changed)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 10:10
    Matt Brailsford
    0

    Hmm, have you setup your TC countries with a 'Region Code' of en-GB? It should be a two letter country code really, so just GB as en-GB is a language reference rather than a country reference.

    PS A different error means we are making progress so don't worry, we will get there 👍

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 16, 2019 @ 10:19
    Gordon Saxby
    1

    Well, well, well - would you look at that!

    enter image description here

    I didn't set this site up (at least, not TC). Also, I haven't changed anything so it was either working or being ignored previously. I've changed it to GB.

    So, now to make a coffee and make sure all the working bits are all in the right place, so I don't lose them!!

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 16, 2019 @ 10:21
    Matt Brailsford
    0

    🎉Wh00p Wh00p! 🎉

    Now that's a wonderful sight to see 😁

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 11:13
    Gordon Saxby
    0

    Erm, not sure whether I should post here or here https://our.umbraco.com/packages/website-utilities/tea-commerce/tea-commerce-support/97338-basket-not-cleared-after-stripe-payment

    I've noticed that the basket does not clear after an order is paid for / completed - as previously noticed in the above post.

    I had added the following to the "Order_Finalized" call (NotificationCenter.Order.Finalized):

            TC.RemoveCurrentOrder(order.StoreId);
    
  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 12:15
    Matt Brailsford
    0

    Do you have any kind of caching or something in place as you are the only person I've seen have this issue. 🤔

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 13:46
    Gordon Saxby
    0

    I upgraded to the latest version of TeaCommerce, 3.3.1, from 3.3.0. I made no other changes to code (except for the payment page as above).

    I have just debugged the code locally and the "NotificationCenter.Order.Finalized" routine is called. No errors happen and it runs the "RemoveCurrentOrder" line of code, above.

    The basket used to empty before upgrading and implementing the new Stripe provider, now it doesn't. It does still work (the basket clears) on our Staging website, which is running TeaCommerce 3.3.0 and the previous Stripe payment processor.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 13:54
    Matt Brailsford
    0

    Are you saying the TC.RemoveCurrentOrder method call isn't clearing the basket either?

    The only thing that was introduced in 3.3.1 regarding the saving of orders was that it's now wrapped in a transaction, but can't see how that would cause this.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 14:02
    Gordon Saxby
    0

    I debugged the app (Visual Studio 2017) to check that the "Finalized" code is called.

    ApplicationStarted:

    NotificationCenter.Order.Finalized += Order_Finalized;
    

    Order_Finalized:

    ...
                var r = TC.RemoveCurrentOrder(order.StoreId);
    

    I added the "var r = " bit so that I could see what it returned (null). immediately after the call, "order" still seems to be populated with the same values.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 14:09
    Matt Brailsford
    0

    Internally TC.RemoveCurrentOrder doesn't actually cause a save anyway, all it ever does it get the order and then clears cookie / session variables.

    Do you have TC configured to use cookies for the site? (in the store settings)

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 14:16
    Gordon Saxby
    0

    enter image description here

    I assume the basket should be cleared automatically, without having to add extra code? Could the TC code be upset by me having code that references the "order" during the "Order_Finalized" routine?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 14:39
    Matt Brailsford
    0

    Ok, can I check, on your Stripe payment form, what is it set to submit to? it should be set to action="@Request.Form["continue_url"]"

    Essentially, when you hit this continue URL, this will post to TC which will set the current order to be the current finalized order in the session controller and also removes it as the current order and THEN redirects to the confirmation page URL.

    I am wondering, if rather than submitting to TCs continue URL, it is actually just being sent to the confirmation page, skipping the continue callback, thus skipping clearing the session.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 14:47
    Gordon Saxby
    0
            <form action="@Request.Form["continue_url"]" method="POST" id="payment-form">
    

    "continue_url" is set to "/en/store/cart-content/confirmation/" - are you saying it should be set to something else?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 14:50
    Matt Brailsford
    0

    No, I was wondering if you'd hard coded the form to be action="/en/store/cart-content/confirmation/" not knowing that Request.Form["continue_url"] isn't just a straight reference to that setting.

    Damn it! I was really hoping that was it as I really don't know why it's not clearing it then.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 17, 2019 @ 15:12
    Gordon Saxby
    0

    So, can you think of anything I could be doing in my code that could stop the TC code from clearing the basket, after the order has been placed?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 17, 2019 @ 15:24
    Matt Brailsford
    0

    Honestly, no. I've exhausted everything I can think of. Only thing I can suggest now is to send over a complete backup of your site (removing any sensitive information) and I'll just have to try and replicate it and see what's going on.

  • Gordon Saxby 1444 posts 1855 karma points
    Jul 18, 2019 @ 13:49
    Gordon Saxby
    0

    I have emailed you regarding this.

Please Sign in or register to post replies

Write your reply to:

Draft