Callum MacGregor Posted November 30, 2023 Posted November 30, 2023 In the automated task generateRenewalInvoices.php, Commerce will try to automatically take payment when a renewal invoice is generated (and a billing address is stored). While I don't think this is wrong necessarily, its not behaviour I desire, and my customers definitely do not want this. The offending line of code is: /* Try to take payment automatically, but *only* if we have a billing address (i.e. the customer has a primary billing address set) otherwise we don't know how we're taxing this and the customer will need to manually come and pay it - we can skip this if tax has not been configured */ if ( $invoice->billaddress OR \count( $availableTaxes ) === 0 ) I would request to have an option to disable this, as right now I have to comment this code out manually to prevent my users from being charged automatically (even if it is to account credit). Kind Regards.
opentype Posted November 30, 2023 Posted November 30, 2023 (edited) Unless you are talking about credits, this should already be an option as part of the Payment Methods settings. Depending on the provider, there are different settings for automatic renewals (on, off, user-choice), saving payment details (to allow automatic payments) and so on. If all of that is turned off, it should just create an invoice and not take money automatically. Edited November 30, 2023 by opentype
Callum MacGregor Posted November 30, 2023 Author Posted November 30, 2023 (edited) There is no such setting for account credit, so payment is taken for users automatically who have enough account credit to cover it. EDIT: Sorry I forgot to clearly clarify in the original post that this affected account credit only. Edited November 30, 2023 by Callum MacGregor
Marc Posted November 30, 2023 Posted November 30, 2023 This would be more a suggestion to change rather than an issue. At present, this is indeed working as intended. Users should opt not to store details if they dont wish for payment to be taken automatically. You could alternatively not allow them to store them by changing the payment method. In terms of credit, this will indeed automatically be drawn on if there is an invoice
Callum MacGregor Posted November 30, 2023 Author Posted November 30, 2023 You're right, its working as intended. I would say that opting to store billing details wouldn't necessarily count as giving consent for continuous billing; but that's a separate issue. But back to the main topic: please could I officially request the ability to disable automatic billing for account credit? Or if its not possible to do it on a granular level, to disable automatic billing entirely for all payment methods.
Recommended Posts