Active
Project:
Commerce License Billing
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2016 at 21:40 UTC
Updated:
14 Dec 2017 at 22:50 UTC
Jump to comment: Most recent
Comments
Comment #2
Lord Pachelbel commentedComment #3
Lord Pachelbel commentedComment #4
Lord Pachelbel commentedComment #5
Lord Pachelbel commentedI think I've found some documentation, sort of. According to https://www.drupal.org/node/2399173 I can use commerce_license_billing_change_status() to schedule a license change.
Comment #6
Lord Pachelbel commentedYes, that is indeed how subscriptions can be scheduled for cancellation. To use that function I'm calling it in a form submit handler in a custom module:
But it's still incomplete. That function will schedule the cancellation of the billing cycle by setting the order line item price to $0.00, but it will not revoke the license when the license period expires.
To handle the revocation I also needed to patch commerce_license_billing with #21 from #2247703: Scheduling cancellations doesn't work properly for prepaid licenses which in turn required a patch to commerce_license from #2736709: Allow modules to back-date $entity->revision_created.
Comment #7
hgoto commentedNice work! This must be really helpful for new users :)
Comment #8
Lord Pachelbel commentedMy solution above is incomplete/incorrect. See https://www.drupal.org/project/commerce_license_billing/issues/2247703#c...