braintree / braintree_dotnet

Braintree .NET library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
136 stars 73 forks source link

Localizing the message of Result object #125

Closed hem-bhagat-tark closed 2 years ago

hem-bhagat-tark commented 2 years ago

I am creating this issue as I didn't find any particular platform to ask this question (like a Discussions tab or a community forum).

General information

Issue description

I am using the Braintree API to process transactions. The SaleAsync method returns an object of type Result. The result has a field named message. My requirement is to localize this message string. Does Braintree provide support for this? If, not what is recommended way of localizing the message from the Result object?

Epreuve commented 2 years ago

Hi @Hem-Tark

We do not currently offer support for localizing the API response that is serialized into the message field, and do not have any plans to add it as a feature. We don't have any specific recommendation if that is something you wish to do as part of your integration.

Be aware that because this field could contain human readable information about any error, it's possible that returning it directly to your payment form could leak implementation details about your integration.