diff --git a/.vscode/launch.json b/.vscode/launch.json index 7cade77..d5d28f8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,7 +33,7 @@ "SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;", "SOCKEYE_DATA_PATH": "c:\\temp\\sockeye", "SOCKEYE_USE_URLS": "http://*:7676;", - //"SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true", + "SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true", //"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1", "SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin" }, diff --git a/server/generator/SockBotProcessVendorNotifications.cs b/server/generator/SockBotProcessVendorNotifications.cs index 0ab8fd9..6bc97d0 100644 --- a/server/generator/SockBotProcessVendorNotifications.cs +++ b/server/generator/SockBotProcessVendorNotifications.cs @@ -95,15 +95,9 @@ namespace Sockeye.Biz var jData = JObject.Parse(vn.VendorData); //It's a test purchase, no need to process it any further...or is there?? + bool IsTestOrder = false; if (jData["order_notification"]["purchase"]["is_test"] != null && jData["order_notification"]["purchase"]["is_test"].Value() == true) - { - - //during debugging allow it to process as a test but normally test orders should stop here -#if (!DEBUG) - return true; -#endif - - } + IsTestOrder = true; //fundamentally validate the object is a purchase notification if (jData["order_notification"]["purchase"]["purchase_id"] == null) @@ -170,6 +164,11 @@ namespace Sockeye.Biz /////////////////////////////////////////////////////////////////////////////////////////// var salesOrderNumber = jData["order_notification"]["purchase"]["purchase_id"].Value(); + if (IsTestOrder) + salesOrderNumber = "test-order-" + salesOrderNumber; +#if (DEBUG) + salesOrderNumber += "-debug-test"; +#endif //https://www.newtonsoft.com/json/help/html/DatesInJSON.htm var purchaseDate = jData["order_notification"]["purchase"]["purchase_date"].Value();