|
@@ -1161,18 +1161,24 @@ internal partial class ProfileHandler
|
|
|
|
|
|
}, request, customerInfo.ApiKey);
|
|
|
|
|
|
- var _httpResult = JsonConvert.DeserializeObject<CPOOuterResponse>(response.Response);
|
|
|
+
|
|
|
logger.LogDebug("completed_session Response" + response.Response);
|
|
|
- JObject jo = JObject.Parse(_httpResult.Data);
|
|
|
- if (jo.ContainsKey("CouponPoint"))
|
|
|
+
|
|
|
+ if (response.Success && !string.IsNullOrEmpty(response.Response))
|
|
|
{
|
|
|
- couponPoint = jo["CouponPoint"].Value<Decimal>();
|
|
|
+ var _httpResult = JsonConvert.DeserializeObject<CPOOuterResponse>(response.Response);
|
|
|
+ logger.LogDebug("completed_session Response" + response.Response);
|
|
|
+ JObject jo = JObject.Parse(_httpResult.Data);
|
|
|
+ if (jo.ContainsKey("CouponPoint"))
|
|
|
+ {
|
|
|
+ couponPoint = jo["CouponPoint"].Value<Decimal>();
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- if (jo.ContainsKey("FarewellMessage"))
|
|
|
- {
|
|
|
- farewellMessage = jo["FarewellMessage"].Value<string>();
|
|
|
+ if (jo.ContainsKey("FarewellMessage"))
|
|
|
+ {
|
|
|
+ farewellMessage = jo["FarewellMessage"].Value<string>();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|