When activating a pending subscription, an initial order needs to be created if missing

Created on 12 March 2019, over 5 years ago
Updated 7 August 2024, 4 months ago

Otherwise the first prepaid billing period is unpaid.

This needs to be done in a job type, to allow for retries. Unsure if in SubscriptionActive or its own, probably its own.
We'd use the "recurring" order type. We can have the billing period start and end on the same date (start date) as a hack.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇷🇸Serbia bojanz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇴Norway zaporylie

    I am not 100% sure whether this is the same issue I am currently experiencing but here are the steps to reproduce something along the lines described in the issue summary:

    1. Create a Billing Schedule: Prepaid, Rolling interval, no trial (the trial shouldn't affect it but it's best to keep it off to make this issue more obvious). Other settings are irrelevant so configure as you wish.
    2. Go to admin/commerce/subscriptions/add and create a Subscription choosing the previously created Billing Schedule. Choose the current start date. Save.
    3. Run Drupal Cron at least 2 times - to populate the queue and to process advancedqueue jobs.
    4. Observe that the initial order is missing (expected since the order wasn't created via checkout) and the first recurring order is subject to the error defined in 🐛 Billing period on recurring orders for prepaid subscriptions should be for the next period, not the current one Needs work . The first recurring prepaid order is however missing.

    Here's the Subscription once it was created:

    Here's the Subscription once it was activated:

Production build 0.71.5 2024