Closed mike-ruane closed 2 years ago
Hi @mike-ruane, thanks for reaching out. Can you elaborate on your use case? What additional attributes of the dispute webhooks would you want to be able to specify in the sampleNotification
request?
Yes sure, sorry it was a bit thin on detail.
So, my use case is I want to filter out a particular Dispute
kind - namely RETRIEVAL
. So I want to mock up a notification that has Dispute.getKind
as RETRIEVAL
. At current, for a DISPUTE_OPENED
mock notification, the kind of dispute is hard coded. I'd want to be able to set this value to retrieval.
I hope that's clearer.
We're brainstorming some solutions.
In the meantime, since the sample notification is a simple hash map, you should be able to get the value of the payload, base64decode it, do a string replacement of chargeback
with retrieval
, then base64 encode it again, and replace the old payload with the new payload.
(yes, this is extremely hacky, but it should get you unstuck)
Closing this issue, as we've forwarded this feature request on to another team for investigation.
I'm using the WebhookTestingGateway to generate test Notifications. My programme does something depending on values of the
kind
on aDispute
. I want to be able to generateDisputes
where I can give in different values. For example:gateway.webhookTesting().sampleNotification(WebhookNotification.Kind.DISPUTE_OPENED, "my_id")
could maybe take other parameters that would set values in the xml appropriately.Thanks