Payment Order Posting Twice
Hello All,
I am having an issue with the application. I am implementing a cashnet service that uses HTTP Notifications. All is going well except when I call _orderService.CreateOrder(). For some reason my code appears to be calling the service twice even though my client is calling it once (verified via logs).
The method type is POST. I will show it below: This method is for testing right now and more security will be added once I get it working locally.
public async Task<ActionResult> CreatePayment(long fkey)
{
var cart = await _cartService.GetActiveCartDetailsByCartId(fkey);
if (cart != null)
{
var orderCreateResult = await _orderService.CreateOrder(cart.Id, "Cashnet", CalculatePaymentFee(cart.OrderTotal), OrderStatus.PendingPayment);
return Ok((Status: "success", OrderId: orderCreateResult.Value.Id));
}
else
{
return Ok((Status: "fail", OrderId: -1));
}
}
When I call this, this is what I get in my dashboard.
For some reason it is creating a pending payment order and then another one with the new status.
Any insight will be helpful.
Check OrderStatus.PendingPayment method.