prepare($deleteQuery); $deleteStmt->bindParam(':paymentMethodId', $paymentMethodId, SQLITE3_INTEGER); if ($deleteStmt->execute()) { $success['success'] = true; $success['message'] = translate('payment_method_removed', $i18n); $json = json_encode($success); header('Content-Type: application/json'); echo $json; } else { http_response_code(500); echo json_encode(array("message" => translate('error', $i18n))); } } else { http_response_code(405); echo json_encode(array("message" => translate('invalid_request_method', $i18n))); } } $db->close(); ?>