Active
Project:
Commerce License Billing
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2015 at 01:33 UTC
Updated:
11 Nov 2016 at 09:00 UTC
Jump to comment: Most recent
Comments
Comment #1
bojanz commentedYou need https://www.drupal.org/project/commerce_dunning
Comment #3
twistedindustries commentedI'd like to reopen this issue. I've got Commerce Dunning and although it does try and attempt to recharge cards, it doesn't, revoke the license, or stop the billing cycle from happening. From my testing even if a hard decline happens the system will continue to recreate recurring orders and the users license will still be good. An admin would have to manually go in and make changes. If there were just some simple conditions to commerce_license_billing_generate_recurring_order or maybe a hook to allow developers to only allow orders with a certain order status to be used to generate a recurring order. A way to then revoke the license would then fall onto the Commerce License devs.
Comment #4
twistedindustries commentedComment #5
janvonmulert commentedHi I have just run into a similar problem, and Im glad Im not alone!
When I used the dunning test module to test dunning, at the end of the dunning cycle, the order was set to past due. The corresponding 'recurring: open', order was still there. The license still has status 'active'.
My license is a remote one, so a remote service needs to be notified (via the license's synchronise function) when the licenses status is set to 'expired' or 'revoked'. When you manually revoke a licence or when it expires, that licenses sync status is set to 'COMMERCE_LICENSE_NEEDS_SYNC' (in addition to its status being set to 'expired' or 'revoked'), so the synchronise function gets called. What I'm trying to figure out is how to make this happen when the order gets set to past due. Maybe I should be doing this with rules or maybe there is a hook I can use?
Im not sure if this should be in the issue queue for commerce license billing, commerce license or commerce dunning. Any suggestions appreciated! Ill report back if I figure something out.
Comment #6
janvonmulert commentedI have a solution, there is an event provided by commerce dunning called "After dunning cycle ended", that can trigger a rule to revoke the license on the order. I noticed that commerce license has a rule to activate all licenses on an order, but not a rule to revoke them, so I made a rules action based on that one that can be placed in a custom module.
then use a rule to fire this action after the dunning cycle ends.
Obviously replace 'mymodule' with the name of your custom module.
According to here https://www.drupal.org/node/2218153, once a license is set to revoked the billing cycle should stop renewing.
I think this action should be part of commerce license so i will be submitting it there.
Comment #7
wizonesolutions@Pharitz: Did you propose that action as a patch to Commerce License in the end? I could review it for you.
Comment #8
vaccinemedia commented@wizonesolutions did this ever get patched into Commerce Licence?
Comment #9
drupov commentedWell, this is a bit interesting: