Пример #1
0
        public async Task <ActionResult> GetPaymentResult(string sessionId)
        {
            var payment = await StripePaymentAppService.GetPaymentAsync(
                new StripeGetPaymentInput
            {
                StripeSessionId = sessionId
            });

            if (payment.TenantId != AbpSession.TenantId)
            {
                return(new NotFoundResult());
            }

            ViewBag.PaymentId = payment.Id;
            return(View());
        }
        public async Task <ActionResult> GetPaymentResult(string sessionId)
        {
            var payment = await StripePaymentAppService.GetPaymentAsync(
                new StripeGetPaymentInput
            {
                StripeSessionId = sessionId
            });

            using (CurrentUnitOfWork.SetTenantId(null))
            {
                var tenant = await _tenantManager.GetByIdAsync(payment.TenantId);

                await _stripeGatewayManager.UpdateCustomerDescriptionAsync(sessionId, tenant.TenancyName);
            }

            if (payment.TenantId != AbpSession.TenantId)
            {
                return(new NotFoundResult());
            }

            ViewBag.PaymentId = payment.Id;
            return(View());
        }