braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 99 forks source link

Missing customFields option for TransactionRefundRequest #94

Closed jmsjr closed 3 years ago

jmsjr commented 3 years ago

General information

Issue description

We currently use custom fields to sort of "tag" transactions into our relevant industry terminologies ( e.g. A customField named "policyNumber" to indicate that the payment is for the insurance policy number, etc. ). While you can specify the values for the custom fields via TransactionRequest.setCustomFields(), it is not possible to set the custom fields for a refund. That is, there is no method TransactionRefundRequest.setCustomFields().

Although in theory, we can obtain the customFields of the original payment transaction that is being refunded, it would make much better sense to have customFields also available via TransactionRefundRequest.

e.g. A customField named 'referenceNumber' would have different values for the payment transaction versus the refund of the payment transaction.

hollabaq86 commented 3 years ago

👋 @jmsjr thanks for the request! I've forwarded your feedback on to the team that owns refunds in our API for consideration.

In the meantime, you could create a table within a database of your own that has the fields you need, and you populate values from our API responses into those entries.