/// <summary> /// Checks to see if the OS supports one of our supported payment methods and enables/disables the 'Checkout' /// button based on the result. /// </summary> private async void CheckForSupportedPaymentMethods() { bool hasSupportedPaymentMethod = await WindowsPaymentOperation.HasSupportedPaymentMethod(); // Update values. this.CheckoutButtonEnabled = hasSupportedPaymentMethod; // Raise all the 'PropertyChanged' events. this.RaisePropertyChanged(nameof(this.CheckoutButtonEnabled)); }
/// <summary> /// Called when the 'Windows Checkout' button is clicked. /// </summary> public async void OnWindowsCheckoutClicked() { await WindowsPaymentOperation.CheckoutAsync(this.ShoppingCart); }