Payment
In the Payment
logic, in the controller, we should have the route payOrder()
, as usual.
And in the service, this is how the method would be. Note that, as we don't need a reference to the order
, due to the way prisma udpates the entity, the implementation becomes a bit cleaner. Also note that we create a payment
as an empty object, as its data will be generated automatically.
Commit - Implementing payment logic
Last updated