Before we move on from the exploration complete listener I do want to mention that you might notice
a little hole in logic inside of your.
At present we are saying that any time you receive the expiration complete events we are always going
to set in order to canceled and this will be applied even if an order has already been paid for.
So I want to point out that there is a little bit of a hole in here so we're going to first take care
of our payment service and then once we had the idea of payments we're going to revisit this thing and
make sure that we consider a order that has been paid for to be fully complete and that we should not
cancel it after we have paid for it.
Okay.
So with all that might I bet you can guess what we're going to do next.
Yep that's right.
We're going to start to work on our payments service the payments service right here.
I want to first begin by just getting a quick overview on what events this thing is going to be receiving
and what it's going to be emitting the payment service is going to first receive any bent of order it
created it will see this event just to tell it that hey here's some order expect to get a payment for
it.
The real goal of communicating order created over is to make sure that the payment service knows how
much money in addition it should be receiving besides that the payment service is also going to listen
for.
Order canceled.
So as soon as the order service emits a order it canceled the event.
We're going to want to tell payments hey time to stop listening for events.
If anyone tries to submit a payment just reject it.
And then finally the payment service itself is going to emit a charge created event so charge created
represents someone paying us some money for an order that church created is eventually going to go over
to the order service and tell it that someone has paid for an order and we should market as paid or
complete or whatever else that is the payment service.
In a nutshell now obviously we have not really discussed and we won't for just a little bit.
How are we going to actually accept payments.
Yes we are going to handle actual credit card numbers and whatnot.
This is gonna be a pretty realistic looking payment service but right now let's just do a little bit
of initial setup on that thing so quick pause right here.
When we come back the next video we're going to start to duplicate the ticket service again.
Get all those dependencies do some community set.
All that stuff that we are now very much used to doing.