Base solution for your next web application
BLACK FRIDAY
From Nov 21
To Dec 1
XXDAYS : XXHRS : XXMIN : XXSEC
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

How to get user ID or user email address after successful payment from stripe #11053


0
shedspotter created

What is your product version? 11.0.0

What is your product type (Angular or MVC)? Angular

What is product framework type (.net framework or .net core)? .NET 6

Hi , I want user detail who made the payment in stripe in TenantManager class, so once the user has successfully completed the payment we need userId or user email address in UpdateTenantAsync mentod of TenantManager class because we need to show the detial of the user who made the payment,

Thanks


10 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @shedspotter

    There are two cases here.

    1. If user is paying for an existing tenant, you can directly use AbpSession.TenantId
    2. If user is paying for creating a new tenant, you can query for admin user of created tenant.
  • 0
    shedspotter created

    Hi @ismcagdas, Thanks for the response in first case I need user email address or user id , I do not required tenantId , I already put a check to get the user id from session but I am not getting it in second case how do I know weather the payments is done from subscription page or done from edition page while create new tenant

  • 0
    shedspotter created

    can some one please ans my query

  • 0
    ismcagdas created
    Support Team

    Hi @shedspotter

    When the tenant is created from admin panel, you can't know if the payment is made or not. Because, admin page is designed for system owners to create a tenant without a payment.

    If a tenant is paying from the public tenant registration page, in that case, you need to follow "you can query for admin user of created tenant." approach. Basically, you will get AbpSession.TenantId and query AbpUsers table with UserName="admin" record.

    Because, when a new tenant registers to the system, a new user with username "admin" is created for that tenant.

  • 0
    shedspotter created

    Hi @ismcagdas, Thanks for the respone, I understood all the scenario but still it is not answering my question

    I am again repeating my question : If user is done the payment through subscription page which is inside naviagtion pannel how do I know which user done the payment becuase any one who has the persmission to that page can make a payment, so I need the details who perform the payment. I only required the user email address.I have tried the abpsession as well to get user id but it is returning null, so please provide a solution so that once the payment is successfully done I need user email address or userId in UpdateTenantAsync mentod of TenantManager .

    Thanks

  • 0
    ismcagdas created
    Support Team

    Hi,

    If user is done the payment through subscription page which is inside naviagtion pannel how do I know which user done the payment becuase any one who has the persmission to that page can make a payment, so I need the details who perform the payment.

    If a user can access to subscription management page, then user must be logged in to the system. In that case, AbpSession.UserId must have a value. Is that the scenario you are asking about ?

  • 0
    shedspotter created

    Hi @ismcagdas, Yes I am asking the same but I am getting AbpSession.UserId as null

  • 0
    ismcagdas created
    Support Team

    Hi @shedspotter

    Could you create a video of this problem and send it to info@aspnetzero.com ? I will check it and reply to you via email.

    Thanks,

  • 0
    shedspotter created

    Hi @ismcagdas, sure will do it and send you in email

  • 0
    ismcagdas created
    Support Team

    Hi @shedspotter

    Thanks. We will reply you once you send the email.