Skip to content

handle recurring installments = 0

JonGold requested to merge JonGold/authnet:zero-installments into master

Currently, passing a param installments = 0 to Order.create results in an error:

E00003: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:totalOccurrences' element is invalid - The value '0' is invalid according to its datatype 'Short' - The MinInclusive constraint failed. 

According to webform_civicrm, "#installments = 0 (or not set) in CiviCRM Core means open ended commitment". There's a recent test locking in this behavior.

I'm having a bit of trouble confirming this based on code in core, but I trust @KarinG on this.

This MR correctly handles passing a value of 0 to installments on a recurring contribution.

Merge request reports

Loading