Base solution for your next web application
Open Closed

Change subscription problem #9599


User avatar
0
Garrett created
  • What is your product version? - v9.0.1.0
  • What is your product type (Angular or MVC)? - MVC & jQuery
  • What is product framework type (.net framework or .net core)? - .NET Core 3.1

In the process of extending "Stripe" payment system i figured out that when trying to change(upgrade) subscription i am getting error "LastPayment was null". I will be very happy if you help me solve this problem.


10 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Garrett

    Is this happening when a Tenant is upgrading from a Free edition to a paid edition ?

    Thanks,

  • User Avatar
    0
    Garrett created

    Hello

    This happens when trying to upgrade from lets say "Pro" to "Enterprise". And also i have integrated the new customer portal that "Stripe" released 2-3 months ago and when i make new WebHook for (customer.subscription.update) it gives the same error because it doesnt create the SubscriptionPayment any suggestion how can i integrate this customer portal easily ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Normally when a tenant purchases an Edition, a payment record must be saved to database. Is this Tenant moved to Pro ediiton on the admin website ?

  • User Avatar
    0
    Garrett created

    Hello, I have switched the "await _subscriptionPaymentRepository.GetLastCompletedPaymentOrDefaultAsync" to "await _subscriptionPaymentRepository.GetLastPaymentOrDefaultAsync" and there is no more error. When new tenant is registered it creates external id with the subscription ID that is created by the "Stripe" and everything works fine but when I am trying to Upgrade subscription from "Pro" to another it creates some external ID that is different from the subscription ID so the stripe service cannot find this id to make changes on the existing subscription

    I am not sure that this is the proper way to do this, can you explain me in short how the stripe subscription works, do I have to make changes on the existing subscription or everytime when users manage their subscription plan should create new stripe subscription ID.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Garrett

    but when I am trying to Upgrade subscription from "Pro" to another it creates some external ID that is different from the subscription ID

    Do you do this on the Tenat list page ? I think user is not upgrading the subscription but you are using the admin panel, right ?

  • User Avatar
    0
    Garrett created

    Hello,

    I am doing this from the Tenant admin account, users don't have an option for subscription update, only tenants do.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Garrett

    Thanks. I actually ment user of the tenant but no problem, I understand what the problem is. Please follow this issue

  • User Avatar
    0
    Garrett created

    @ismcagdas

    The link you sent doesn't work.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You need to add your GitHub user on https://aspnetzero.com/LicenseManagement. After that, you can see the link (it is a private link).

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Garrett

    Is it possible that someone changed the values on database manually ? Because we couldn't reproduce this problem with the latest version.