The issue occurs because the order_details["payment"]["status"] key is missing.
order_details["payment"]["status"]