braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

XMLWriter::text() expects parameter 1 to be string #300

Closed natewallis closed 2 years ago

natewallis commented 3 years ago

General information

Issue description

Request sent to Braintree gateway, the response triggers an error in the braintree PHP composer library:

PHP Warning: XMLWriter::text() expects parameter 1 to be string, object given in /braintree/braintree_php/lib/Braintree/Xml/Generator.php on line 94

This is the object that triggers the issue:

[09-Jun-2021 14:14:13 Australia/Sydney] stdClass Object ( [device_session_id] => XXXX [fraud_merchant_id] => XXXX )

It appears to be trying to build some XML and is passed this object instead of a string...

Let me know if you need more information.

crookedneighbor commented 3 years ago

Can you provide the code you are using that triggers the error? (with api keys redacted, of course)

hollabaq86 commented 2 years ago

device session ID and fraud merchant ID were removed as of version 6.0.0. Use deviceData instead.