cybersource-sdk-php
cybersource-sdk-php copied to clipboard
empty XML field causes PHP Catchable fatal error
Observed behavior: with a billTo block in an XML request like this:
<billTo>
<firstName>Friday</firstName>
<lastName>Test</lastName>
<street1>123 Test St</street1>
<street2></street2>
<city>My City</city>
<state>CA</state>
<postalCode>12345</postalCode>
<country>US</country>
<email>[email protected]</email>
<customerID>56</customerID>
</billTo>
I get
PHP Catchable fatal error: Object of class stdClass could not be converted to string in lib/CybsSoapClient.php on line 89
This is because the street2
field has no data. Removing that field causes the request to succeed.
Expected behavior: the request will succeed even with an empty field.