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
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

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
@@ -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);

0 comments on commit 2da2779

Please sign in to comment.