From 07d6b9cd7baa66b547e462861948acf025ebef38 Mon Sep 17 00:00:00 2001 From: Jon Jensen Date: Wed, 27 Nov 2019 17:41:31 -0700 Subject: [PATCH] Allow sending 0 values via web service The code was mistakenly excluding custom field values of 0. --- lib/WebService/Braintree/Xml.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebService/Braintree/Xml.pm b/lib/WebService/Braintree/Xml.pm index 9de7b60..23b0a39 100644 --- a/lib/WebService/Braintree/Xml.pm +++ b/lib/WebService/Braintree/Xml.pm @@ -36,7 +36,7 @@ sub add_node { } elsif (is_arrayref($value)) { build_from_array($parent, $value); } else { - $parent->appendText($value) if $value; + $parent->appendText($value) if defined($value) and length($value); } }