This commit is contained in:
@@ -161,6 +161,12 @@ namespace Sockeye.Biz
|
|||||||
|
|
||||||
var salesOrderNumber = jData["order_notification"]["purchase"]["purchase_id"].Value<string>();
|
var salesOrderNumber = jData["order_notification"]["purchase"]["purchase_id"].Value<string>();
|
||||||
|
|
||||||
|
if (await ct.Purchase.AnyAsync(z => z.SalesOrderNumber == salesOrderNumber))
|
||||||
|
throw new System.ApplicationException($"Sales order already exists: {salesOrderNumber} will not be processed");
|
||||||
|
|
||||||
|
//ok, turn this into a fully realized Purchase record
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user