I'm making a custom payment module for Commerce that references a Credit Card entity. I have the entity reference form field in there and working but I cannot pass on the selected Credit Card entity to the "message" field. If I could just print whatever the title of the entity reference they select, that would work, or if I could access one of the 5 fields in the entity itself, that would be ideal.
Here is my module: http://pastebin.com/373WDAzA and this is the error message I get:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1559 of C:\xampp\htdocs\includes\bootstrap.inc).