diff --git a/server/Controllers/GlobalBizSettingsController.cs b/server/Controllers/GlobalBizSettingsController.cs index e533111..fecc9db 100644 --- a/server/Controllers/GlobalBizSettingsController.cs +++ b/server/Controllers/GlobalBizSettingsController.cs @@ -149,20 +149,20 @@ namespace Sockeye.Api.Controllers - /// - /// import data from rockfish that isn't already present - /// - /// No content - [HttpPost("import-rockfish")] - public async Task ImportRockfish([FromBody] Customer newObject, ApiVersion apiVersion) - { - if (!serverState.IsOpen) - return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); + // /// + // /// import data from rockfish that isn't already present + // /// + // /// No content + // [HttpPost("import-rockfish")] + // public async Task ImportRockfish([FromBody] Customer newObject, ApiVersion apiVersion) + // { + // if (!serverState.IsOpen) + // return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); - GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct, HttpContext); - await biz.ImportRockfish(ct, log); - return NoContent(); - } + // GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct, HttpContext); + // await biz.ImportRockfish(log); + // return NoContent(); + // } diff --git a/server/generator/SockBotProcessVendorNotifications.cs b/server/generator/SockBotProcessVendorNotifications.cs index ba32027..eb77706 100644 --- a/server/generator/SockBotProcessVendorNotifications.cs +++ b/server/generator/SockBotProcessVendorNotifications.cs @@ -242,7 +242,10 @@ namespace Sockeye.Biz c.DoNotContact = false;//if they just made a purchase they are contactable even if they weren't before c.Address = c.PostAddress = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["street1"].Value(); c.City = c.PostCity = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["city"].Value(); - c.Region = c.PostRegion = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["state"].Value(); + + //State doesn't always exist in mycommerce notifications + if (jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["state"] != null) + c.Region = c.PostRegion = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["state"].Value(); c.Country = c.PostCountry = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["country"].Value(); c.PostCode = c.AddressPostal = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["address"]["postal_code"].Value(); var firstName = jData["order_notification"]["purchase"]["customer_data"]["delivery_contact"]["first_name"].Value() ?? "FirstNameEmpty";