Skip to content

Commit

Permalink
# Checking that no more than one shipping option is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
maurok committed May 17, 2017
1 parent 8259155 commit 2da2779
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,10 @@ private async Task OnInvoke(IInvokeActivity invoke, IConnectorClient connectorCl
}
}

// do not require or check default selected option
//if (result.Details.ShippingOptions.Count(option => option.Selected.HasValue && option.Selected.Value) != 1)
//{
// throw new ArgumentException("Expected exactly zero or one selected shipping option.");
//}
if (result.Details.ShippingOptions.Count(option => option.Selected.HasValue && option.Selected.Value) > 1)
{
throw new ArgumentException("Expected exactly zero or one selected shipping option.");
}

// update payment details after shipping changed
await this.shippingService.UpdatePaymentDetailsAsync(result.Details, paymentRequestUpdate.ShippingAddress, catalogItem);
Expand Down

0 comments on commit 2da2779

Please sign in to comment.