This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -33,7 +33,7 @@
|
|||||||
"SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;",
|
"SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;",
|
||||||
"SOCKEYE_DATA_PATH": "c:\\temp\\sockeye",
|
"SOCKEYE_DATA_PATH": "c:\\temp\\sockeye",
|
||||||
"SOCKEYE_USE_URLS": "http://*:7676;",
|
"SOCKEYE_USE_URLS": "http://*:7676;",
|
||||||
//"SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true",
|
"SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true",
|
||||||
//"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1",
|
//"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1",
|
||||||
"SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
|
"SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -95,15 +95,9 @@ namespace Sockeye.Biz
|
|||||||
var jData = JObject.Parse(vn.VendorData);
|
var jData = JObject.Parse(vn.VendorData);
|
||||||
|
|
||||||
//It's a test purchase, no need to process it any further...or is there??
|
//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<bool>() == true)
|
if (jData["order_notification"]["purchase"]["is_test"] != null && jData["order_notification"]["purchase"]["is_test"].Value<bool>() == true)
|
||||||
{
|
IsTestOrder = true;
|
||||||
|
|
||||||
//during debugging allow it to process as a test but normally test orders should stop here
|
|
||||||
#if (!DEBUG)
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//fundamentally validate the object is a purchase notification
|
//fundamentally validate the object is a purchase notification
|
||||||
if (jData["order_notification"]["purchase"]["purchase_id"] == null)
|
if (jData["order_notification"]["purchase"]["purchase_id"] == null)
|
||||||
@@ -170,6 +164,11 @@ namespace Sockeye.Biz
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var salesOrderNumber = jData["order_notification"]["purchase"]["purchase_id"].Value<string>();
|
var salesOrderNumber = jData["order_notification"]["purchase"]["purchase_id"].Value<string>();
|
||||||
|
if (IsTestOrder)
|
||||||
|
salesOrderNumber = "test-order-" + salesOrderNumber;
|
||||||
|
#if (DEBUG)
|
||||||
|
salesOrderNumber += "-debug-test";
|
||||||
|
#endif
|
||||||
|
|
||||||
//https://www.newtonsoft.com/json/help/html/DatesInJSON.htm
|
//https://www.newtonsoft.com/json/help/html/DatesInJSON.htm
|
||||||
var purchaseDate = jData["order_notification"]["purchase"]["purchase_date"].Value<DateTime>();
|
var purchaseDate = jData["order_notification"]["purchase"]["purchase_date"].Value<DateTime>();
|
||||||
|
|||||||
Reference in New Issue
Block a user