When doing a $chargeService->charge() call with a token that is a string and not an instance of HpsTokenData the existing code assigns the new HpsTokenData instance to itself as the tokenValue property, this creates a recursion error. It should be assigning the token string rather than the token object.
Good morning Andy,
Thank you for this report and proposed solution. We identified a gap in our automated testing because of this as well. We intend to add these corrections shortly
When doing a $chargeService->charge() call with a token that is a string and not an instance of HpsTokenData the existing code assigns the new HpsTokenData instance to itself as the tokenValue property, this creates a recursion error. It should be assigning the token string rather than the token object.