Zeus
04/13/2023, 9:55 AM/makePayment
That endpoint takes in two input parameters i.e, _payment_token_ and _customer_id_
Whenever consumer service hits that endpoint, provider internally calls a third party service(external vendor) to make the payment based on payment token and customer id. And returns the response accordingly.
The catch is that each payment_token can be used only once. And 3rd party service doesn’t provide a dummy/static token, and there exists a way to call an endpoint in 3rd party staging env to generate the token.
My point is that while generating the contract tests in consumer side, we don’t know have payment_token. So, how should I approach this problem?
One way I could think is to mock 3rd party service in provider side and carry out the tests. However, if I would like to avoid mocking and want to call staging env of 3rd party service from provider service, then is it feasible to carry out contract testing?Matt (pactflow.io / pact-js / pact-go)
Zeus
04/13/2023, 10:42 AMZeus
04/13/2023, 10:46 AMTimothy Jones
04/13/2023, 12:43 PMTimothy Jones
04/13/2023, 12:43 PM