コード例 #1
0
        public IActionResult Donation(int price)
        {
            if (!_packageService.IsPackageValid(price))
            {
                return(View("Invalid"));
            }
            ViewBag.PublishableKey = _stripeService.GetPublishableKey();
            ViewBag.Currency       = _packageService.GetCurrency();
            DonationCheckout recharge = new DonationCheckout
            {
                Price       = price,
                Description = $"Donation for {_packageService.GetCashValue(price)} Cash!",
            };

            return(View(recharge));
        }