compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

IO-132: Fix Auto-renewal Job #332

Closed MiyaNoctem closed 3 years ago

MiyaNoctem commented 3 years ago

Overview

Auto-renewal jobs are failing when there were plans to renew, with the message Failure, Error message: Errors found on auto-renewals: An error occurred renewing a payment plan with id (X): is not of type String.

Before

There was a bug on the PostOfflineAutorenewa hook dispatch class, that was using class attributes that didn't exist to be sent as the hook's inputs. Thus all were null on every dispatch, causing a query that used them to fail.

After

Updated the attribute names. Also added tests to verify inputs to the dispatch class arrive ok to the hook's implementation methods.