- 
                Notifications
    You must be signed in to change notification settings 
- Fork 102
Closed
Description
Context
Now that we are sending outgoing payment cancelled & funded events (RAF-1156), we can update how we handle those events in card service.
Depending on the event, we will return a different result for the waiting /payment request (from POS Service).
Todo
- 
Make sure we return 200as the status code when we receive the webhook in card service. (Otherwise, the webhook service will fail)
- 
If we get an outgoing payment cancelled event (with invalid_signature), to the original request from POS service, we should return { "requestId":"", "result": { "code": "invalid_signature", "description":"Invalid card signature" } }
- 
If we get an outgoing payment funded event, we should return: { "requestId":"", "result": { "code": "approved", } }
- 
If there was some other error in the request, we should throw a 400 Bad Request with the following: { "error": { "code": "invalid_request", "description":"" // some useful debugging information } }