hps / heartland-php

Heartland Payment Systems Payment Gateway PHP SDK
https://developer.heartlandpaymentsystems.com/SecureSubmit/
GNU General Public License v2.0
25 stars 23 forks source link

Fixed token recursion problem when token is a string #21

Closed andyrooster closed 8 years ago

andyrooster commented 8 years ago

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.

ttnnkkrr commented 8 years ago

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