braintree / braintree_php

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

_disputeOpenedSampleXml transaction id and dispute id are identical #206

Closed artpi closed 6 years ago

artpi commented 6 years ago

In the test xml files, the "dispute id" is identical ( passed $id ) to transaction id - the same parameter is used. https://github.com/braintree/braintree_php/blob/master/lib/Braintree/WebhookTesting.php#L256

I don't think it should be.

In the webhooks we are receiving, the ids are different.

It is the same case for _disputeOpenedSampleXml, _disputeLostSampleXml, _disputeWonSampleXml. Shouldn't these functions accept 2 parameters each ?

crookedneighbor commented 6 years ago

Thanks for the feedback.

Yes, in a live setting those ids would likely be different, but for the use to prepare your server to accept real webhooks, it's not necessary to differentiate them so for now we're going to leave it as is rather than complicate the signature and make them different from the other test webhook methods.