braintree / braintree_python

Braintree Python library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
242 stars 115 forks source link

Add ID to Transaction in SubscriptionChargedSuccessfully sample notification webhook #99

Closed bjackson closed 5 years ago

bjackson commented 6 years ago

Summary

I added a random ID to the Transaction in the webhook. I think many usages of this library might capture the ID on a Transaction, and this would help support unit testing.

Checklist

jackellenberger commented 6 years ago

Hey @bjackson, would you mind expanding a little more on what your use case is for this? There is currently a way to provide an id when generating a sample webhook notification that I think could fill the same role as the id this PR introduces, but I may be misinterpreting what you're looking to do.

jaypatel512 commented 6 years ago

Looking at your PR @bjackson ! It looks like you meant adding SubscriptionChargedUnsuccessfully and NOT SubscriptionChargedSuccessfully. Is that correct ?

bjackson commented 6 years ago

@jaypatel512, Yes. I mistyped.

@jackellenberger, in my codebase, I was capturing transactions and their IDs. The transactions in the sample webhook notifications didn't include an ID attribute on them, and caused my tests to fail.

jackellenberger commented 5 years ago

Hey @bjackson, do you have the time to make the changes requested here and here ? If not, we can make it on our end. Either way, we're looking to release this change relatively soon. It should already be live in the latest releases of Java, Node, and PHP.